forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


How do you clear a COMBO box listing?

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
vtol
Valued Contributor
Valued Contributor


Joined: 05 Feb 2004
Posts: 656
Location: Eastern Indiana

PostPosted: Tue Apr 27, 2004 8:04 am    Post subject: How do you clear a COMBO box listing? Reply with quote

I tried:


LIST clear, 1
dialog clear,box1
dialog set,box1,

none worked, guess I forgot how to do this... Sad
Back to top
View user's profile Send private message Visit poster's website
Serge
Professional Member
Professional Member


Joined: 04 Mar 2002
Posts: 1480
Location: Australia

PostPosted: Tue Apr 27, 2004 8:59 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website MSN Messenger
vtol
Valued Contributor
Valued Contributor


Joined: 05 Feb 2004
Posts: 656
Location: Eastern Indiana

PostPosted: Tue Apr 27, 2004 9:13 am    Post subject: Reply with quote

My COMBO is called box1, sorry, dun tried that, and no success Sad
Back to top
View user's profile Send private message Visit poster's website
Serge
Professional Member
Professional Member


Joined: 04 Mar 2002
Posts: 1480
Location: Australia

PostPosted: Tue Apr 27, 2004 9:31 am    Post subject: Reply with quote

interesting problem...it does clear the combo but not the entry displayed in the combo...that one is left behind

serge

_________________
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Serge
Professional Member
Professional Member


Joined: 04 Mar 2002
Posts: 1480
Location: Australia

PostPosted: Tue Apr 27, 2004 9:34 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website MSN Messenger
vtol
Valued Contributor
Valued Contributor


Joined: 05 Feb 2004
Posts: 656
Location: Eastern Indiana

PostPosted: Tue Apr 27, 2004 9:57 am    Post subject: Reply with quote

I remembered how to do it finally Serge Stupid (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) Cool - if you know what I mean.

Thanks for your help Serge Smile Aprreciate it...


Last edited by vtol on Tue Apr 27, 2004 2:44 pm; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
Serge
Professional Member
Professional Member


Joined: 04 Mar 2002
Posts: 1480
Location: Australia

PostPosted: Tue Apr 27, 2004 2:43 pm    Post subject: Reply with quote

glad to hear that you remembered how to do it Smile

glad to help 2

serge

_________________
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
vdsalchemist
Admin Team


Joined: 23 Oct 2001
Posts: 1448
Location: Florida, USA

PostPosted: Tue Apr 27, 2004 8:05 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
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

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group