| View previous topic :: View next topic |
| Author |
Message |
Jimjams Newbie

Joined: 23 Sep 2002 Posts: 21
|
Posted: Tue Oct 15, 2002 2:05 pm Post subject: Highlighted list item |
|
|
When you add a list to a dialog, the first item in the list is automatically highlighted.
Is there a way to prevent this so that it's obvious to the user that he has to make a selection himself?  |
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Tue Oct 15, 2002 2:13 pm Post subject: |
|
|
You can insert a blank line at the top of the list, then
use LIST SEEK, Listname, 0...
Cheers, Mac  _________________ VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
 |
|
| Back to top |
|
 |
FreezingFire Admin Team

Joined: 23 Jun 2002 Posts: 3508
|
Posted: Tue Oct 15, 2002 9:13 pm Post subject: |
|
|
You could also use DIALOG FOCUS,ElementName to focus on another button, or just don't add the list to the dialog first.
| Code: | DIALOG CREATE,List Example,-1,0,322,161
DIALOG ADD,LIST,LIST1,8,22,180,144
LIST ADD,LIST1,List Item 1
LIST ADD,LIST1,List Item 2
DIALOG ADD,BUTTON,BUTTON1,8,212,92,24,Button Element
DIALOG SHOW
REM Put the focus on a button instead of the list
DIALOG FOCUS,BUTTON1
WAIT EVENT
IF @NOT(@ITEM(LIST1))
WARN You should add code to warn the user to select an item here
end
exit |
_________________ FreezingFire
VDSWORLD.com
Site Admin Team
Last edited by FreezingFire on Wed Oct 16, 2002 6:52 pm; edited 1 time in total |
|
| Back to top |
|
 |
Jimjams Newbie

Joined: 23 Sep 2002 Posts: 21
|
Posted: Wed Oct 16, 2002 11:14 am Post subject: |
|
|
Thanks guys
You gave me some new ideas  |
|
| Back to top |
|
 |
vdsalchemist Admin Team

Joined: 23 Oct 2001 Posts: 1448 Location: Florida, USA
|
Posted: Sat Oct 19, 2002 9:56 pm Post subject: |
|
|
Or you can just send the LB_SETCURSEL with the WPARAM set to -1 to the listbox...
| Code: |
title TEST
DIALOG CREATE,TEST,-1,0,213,215
DIALOG ADD,BUTTON,BUTTON1,170,70,,,&Close,DEFAULT
DIALOG ADD,LIST,LIST1,10,12
DIALOG SHOW
Dialog Focus,LIST1
list add,list1,Vds Is cool
list add,list1,Hello World
list add,list1,Good Bye World
%A = @sendmsg(@win(~LIST1),$0186,-1,0)
rem Removes the selection from the ListBox
:evloop
wait event
goto @event()
:BUTTON1BUTTON
:CLOSE
exit
|
Have fun... _________________ Home of
Give VDS a new purpose!
 |
|
| Back to top |
|
 |
moke Contributor

Joined: 02 Jan 2002 Posts: 162
|
Posted: Sat Oct 19, 2002 10:06 pm Post subject: |
|
|
Hey Mindpower,
I hate to criticize other people's work but shouldn't your third list item syntax be:
List add, list1, Good Bye CRUEL World
Ouch! I regret this post already
moke |
|
| 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
|
|