| View previous topic :: View next topic |
| Author |
Message |
vtol Valued Contributor


Joined: 05 Feb 2004 Posts: 656 Location: Eastern Indiana
|
Posted: Tue Apr 27, 2004 8:04 am Post subject: How do you clear a COMBO box listing? |
|
|
I tried:
LIST clear, 1
dialog clear,box1
dialog set,box1,
none worked, guess I forgot how to do this...  |
|
| Back to top |
|
 |
Serge Professional Member


Joined: 04 Mar 2002 Posts: 1480 Location: Australia
|
Posted: Tue Apr 27, 2004 8:59 am Post subject: |
|
|
umh...i think that the following should do the trick for you...if your combo is called COMBO1 then LIST CLEAR, COMBO1 should clear the combo
serge _________________
|
|
| Back to top |
|
 |
vtol Valued Contributor


Joined: 05 Feb 2004 Posts: 656 Location: Eastern Indiana
|
Posted: Tue Apr 27, 2004 9:13 am Post subject: |
|
|
My COMBO is called box1, sorry, dun tried that, and no success  |
|
| Back to top |
|
 |
Serge Professional Member


Joined: 04 Mar 2002 Posts: 1480 Location: Australia
|
Posted: Tue Apr 27, 2004 9:31 am Post subject: |
|
|
interesting problem...it does clear the combo but not the entry displayed in the combo...that one is left behind
serge _________________
|
|
| Back to top |
|
 |
Serge Professional Member


Joined: 04 Mar 2002 Posts: 1480 Location: Australia
|
Posted: Tue Apr 27, 2004 9:34 am Post subject: |
|
|
found an answer for you...add the style LIST to your combo and the combo will be treated as a list and the whole combo will be cleared with LIST CLEAR, BOX1
serge _________________
|
|
| Back to top |
|
 |
vtol Valued Contributor


Joined: 05 Feb 2004 Posts: 656 Location: Eastern Indiana
|
Posted: Tue Apr 27, 2004 9:57 am Post subject: |
|
|
I remembered how to do it finally Serge (updated this POST section). Using the LIST style was good, but I couldn't get Text in the Header area, so the below works both ways.
| Code: | DIALOG ADD,combo,box1,6,12,502,22,,,click,sorted
LIST clear, 1
dialog clear,box1
dialog set,box1,@item(1) <-- sets the control title
list append,area,@text(1) <-- Fills the drop down list
:clear-combo <able to clear the COMBO drop down list>
dialog clear,box1
dialog clear,area
list clear,area
|
This way you can get Text in the Header area, plus you can CLEAR it all when you want (full control of the controls) - if you know what I mean.
Thanks for your help Serge Aprreciate it...
Last edited by vtol on Tue Apr 27, 2004 2:44 pm; edited 1 time in total |
|
| Back to top |
|
 |
Serge Professional Member


Joined: 04 Mar 2002 Posts: 1480 Location: Australia
|
Posted: Tue Apr 27, 2004 2:43 pm Post subject: |
|
|
glad to hear that you remembered how to do it
glad to help 2
serge _________________
|
|
| Back to top |
|
 |
vdsalchemist Admin Team

Joined: 23 Oct 2001 Posts: 1448 Location: Florida, USA
|
Posted: Tue Apr 27, 2004 8:05 pm Post subject: |
|
|
vtol,
Why don't you just use this to remove everything from a combo box including the Text in the combo box's edit box?
| Code: | title TEST
%%CB_RESETCONTENT = $014B
DIALOG CREATE,TEST,-1,0,207,98
DIALOG ADD,BUTTON,BUTTON1,46,64,,,Delete All,,DEFAULT
DIALOG ADD,COMBO,COMBO1,10,10,,,Testit
DIALOG SHOW
list add,combo1,Visual
list add,combo1,DialogScript
:evloop
wait event
goto @event()
:BUTTON1BUTTON
rem Deletes everything from the combo box
%A = @sendmsg(@winexists(~COMBO1),%%CB_RESETCONTENT,0,0)
goto evloop
:CLOSE
exit
|
_________________ Home of
Give VDS a new purpose!
 |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|