Door Library Null Reference Exception

sahoopes

Member
Licensed User
UseMnemonic property of Labels is giving me a problem. I am displaying one line of text from a database. It could contain a "&" and I do not want that replaced with a "_".

I first tried the following:

Label1.text=rStrReplace(text,"&","&&")

That was fine but I thought it would be better to just use the Door Library to set UseMnemonic to false:

Door.FromControl("Label1")
msgbox(Door.GetProperty("UseMnemonic")
Door.SetProperty("UseMnemonic",false)

Using either of the last 2 lines will cause a NullReferenceException error.

I'm using my previous code to get around this so just reporting my error.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…