Hi,
I have a panel in wich i load up to 10 label with the filenames of a specific directory...so far so good.
Then I use the mouse down event to determine the user choice, and change the correspondent label to a red font...so far so good....unless i tap on an empty label, then I get the error:
If control(selected).text<>"" then control(selected).fontcolor=cred
Error description:
Variable selected was not assigned any value.
If i disable the "check unassigned variables" option I get a NullReference error!!!
I know it wasn't, because the label is empty, but should the condition return false and do nothing?
Anyway for the time being i first load all labels with a "." and the test to see if its diferent...That works but the dots are
Ugly!
Update: Replaced the "." with a space and it works...I'll stick with it!!
I have a panel in wich i load up to 10 label with the filenames of a specific directory...so far so good.
Then I use the mouse down event to determine the user choice, and change the correspondent label to a red font...so far so good....unless i tap on an empty label, then I get the error:
If control(selected).text<>"" then control(selected).fontcolor=cred
Error description:
Variable selected was not assigned any value.
If i disable the "check unassigned variables" option I get a NullReference error!!!
I know it wasn't, because the label is empty, but should the condition return false and do nothing?
Anyway for the time being i first load all labels with a "." and the test to see if its diferent...That works but the dots are
Ugly!
Update: Replaced the "." with a space and it works...I'll stick with it!!
Last edited: