Clear the contents of a list control?

General HouseBot discussion. Any issues that don't fit into any of the other topics belong here.
Post Reply
dlmorgan999
HouseBot Special Member
Posts: 409
Joined: Tue Jul 13, 2004 9:13 am
Location: Tigard, OR

Clear the contents of a list control?

Post 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
ScottBot
Site Admin
Posts: 2790
Joined: Thu Feb 13, 2003 6:46 pm
Location: Georgia (USA)
Contact:

Re: Clear the contents of a list control?

Post by ScottBot »

Try this:


Code: Select all

SetPropertyValue "DVD List.DVD Titles", Chr( 10 )
Scott
dlmorgan999
HouseBot Special Member
Posts: 409
Joined: Tue Jul 13, 2004 9:13 am
Location: Tigard, OR

Post 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: ).
dlmorgan999
HouseBot Special Member
Posts: 409
Joined: Tue Jul 13, 2004 9:13 am
Location: Tigard, OR

Post 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
ScottBot
Site Admin
Posts: 2790
Joined: Thu Feb 13, 2003 6:46 pm
Location: Georgia (USA)
Contact:

Post by ScottBot »

How about clearing the lists when you leave the Panel? Then they will be empty when you return.
Scott
dlmorgan999
HouseBot Special Member
Posts: 409
Joined: Tue Jul 13, 2004 9:13 am
Location: Tigard, OR

Post by dlmorgan999 »

Gee - that sounds like a great idea! I wonder why I didn't think of that :-)
Post Reply