| View previous topic :: View next topic |
| Author |
Message |
chucks0 Newbie
Joined: 08 Jun 2002 Posts: 23
|
Posted: Wed Jun 12, 2002 1:48 am Post subject: Clearing Combo and List Selection |
|
|
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 |
|
 |
SnarlingSheep Professional Member


Joined: 13 Mar 2001 Posts: 759 Location: Michigan
|
Posted: Wed Jun 12, 2002 2:27 am Post subject: |
|
|
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 |
|
 |
Tommy Admin Team
Joined: 16 Nov 2002 Posts: 746 Location: The Netherlands
|
Posted: Wed Jun 12, 2002 1:20 pm Post subject: |
|
|
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 |
|
 |
moke Contributor

Joined: 02 Jan 2002 Posts: 162
|
Posted: Wed Jun 12, 2002 3:14 pm Post subject: |
|
|
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
moke |
|
| Back to top |
|
 |
chucks0 Newbie
Joined: 08 Jun 2002 Posts: 23
|
Posted: Wed Jun 12, 2002 3:42 pm Post subject: Thanks!! |
|
|
Thanks Tommy, seeking to the last item in the list and then using the @next command did the trick.
Charles |
|
| 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
|
|