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 


Clearing Combo and List Selection

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


Joined: 08 Jun 2002
Posts: 23

PostPosted: Wed Jun 12, 2002 1:48 am    Post subject: Clearing Combo and List Selection Reply with quote

I am working on a script that presents the user with a combo box or list box of choices. The user picks an item from the list, then continues. After processing the item they picked, I want to return them to the original dialog with the combo box reset (no selection).

How do you clear the selection once it has been made?

LIST SEEK,1,??


Thanks,

Charles
Back to top
View user's profile Send private message
SnarlingSheep
Professional Member
Professional Member


Joined: 13 Mar 2001
Posts: 759
Location: Michigan

PostPosted: Wed Jun 12, 2002 2:27 am    Post subject: Reply with quote

I don't believe there is an easy way to remove the selection in a list.
So try this:
Code:

  REM *** Create an empty hidden List
  LIST CREATE,2
  REM *** Move contents of your List that is showing, to List 2.
  LIST ASSIGN,2,List1
  REM *** Clear List that is showing.
  LIST CLEAR,LIST1
  REM *** Put everything back.
  LIST ASSIGN,LIST1,2
  LIST CLOSE,2

_________________
-Sheep
My pockets hurt...
Back to top
View user's profile Send private message Send e-mail
Tommy
Admin Team


Joined: 16 Nov 2002
Posts: 746
Location: The Netherlands

PostPosted: Wed Jun 12, 2002 1:20 pm    Post subject: Reply with quote

You might want to try:

Code:

  DIALOG CREATE,Nieuw dialoogvenster,-1,0,240,189
  DIALOG ADD,LIST,LIST1,8,8,224,144
  DIALOG ADD,COMBO,COMBO1,160,8,224,21,COMBO1
  DIALOG SHOW

  list add,list1,a
  list add,list1,b
  list add,list1,c
  list add,list1,d
  list seek,list1,2
  list seek,list1,@pred(@count(list1))
  %x = @next(list1)
  info List selection:@cr()@item(list1)

  list add,combo1,a
  list add,combo1,b
  list add,combo1,c
  list add,combo1,d
  list seek,combo1,2
  list seek,combo1,@pred(@count(combo1))
  %x = @next(combo1)
  info Combo selection:@cr()@item(combo1)



Tommy
Back to top
View user's profile Send private message Send e-mail Visit poster's website
moke
Contributor
Contributor


Joined: 02 Jan 2002
Posts: 162

PostPosted: Wed Jun 12, 2002 3:14 pm    Post subject: Reply with quote

If i understand the question correctly, add a blank item at list position 0, use the event that submits this choice to check if it is 0 and make this choice illegal. Then make sure your list always defaults back to position 0 with LIST SEEK.

Hope this helps Smile

moke
Back to top
View user's profile Send private message Send e-mail
chucks0
Newbie


Joined: 08 Jun 2002
Posts: 23

PostPosted: Wed Jun 12, 2002 3:42 pm    Post subject: Thanks!! Reply with quote

Thanks Tommy, seeking to the last item in the list and then using the @next command did the trick.


Charles
Back to top
View user's profile Send private message
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