Page 1 of 1

Clear the contents of a list control?

Posted: Thu Nov 18, 2004 12:40 am
by dlmorgan999
Plain and simple - is there any way to clear the contents of a list control? I want to be able to start with a blank slate every time I open a panel that contains a list control. I tried doing this


Code: Select all


SetPropertyValue "DVD List.DVD Titles", ""



in a script and then executing that script as part of the Enter List for the panel but nothing happened.



-- Dave

Re: Clear the contents of a list control?

Posted: Thu Nov 18, 2004 8:58 am
by ScottBot
Try this:


Code: Select all

SetPropertyValue "DVD List.DVD Titles", Chr( 10 )

Posted: Thu Nov 18, 2004 10:05 am
by dlmorgan999
That did the trick. It's funny - I actually thought of doing this last night as I was going to sleep (I just can't seem to stop thinking about HouseBot :wink: ).

Posted: Thu Nov 18, 2004 4:41 pm
by dlmorgan999
I think this is a good example of where a "multi command" or "macro" button type would be useful. I open the panel containing the list control using a panel change button. In the panel Enter List I have my script that is run to clear the list box and some associated values. The issue is that I briefly see the list and values right after the panel opens before the script is run.



Ideally I would clear these values *before* opening the panel but I don't know how to accomplish that. I would use a script or task but I can't open the panel on only a specified software remote. If I had a "multi command" button I could run the script to clear the values and then change panels. Can you think of any other way to accomplish this?



-- Dave

Posted: Thu Nov 18, 2004 5:45 pm
by ScottBot
How about clearing the lists when you leave the Panel? Then they will be empty when you return.

Posted: Thu Nov 18, 2004 9:47 pm
by dlmorgan999
Gee - that sounds like a great idea! I wonder why I didn't think of that :-)