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 


Highlighted list item

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


Joined: 23 Sep 2002
Posts: 21

PostPosted: Tue Oct 15, 2002 2:05 pm    Post subject: Highlighted list item Reply with quote

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? Confused
Back to top
View user's profile Send private message
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Tue Oct 15, 2002 2:13 pm    Post subject: Reply with quote

You can insert a blank line at the top of the list, then
use LIST SEEK, Listname, 0...

Cheers, Mac Smile

_________________
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
View user's profile Send private message Send e-mail
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Tue Oct 15, 2002 9:13 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Jimjams
Newbie


Joined: 23 Sep 2002
Posts: 21

PostPosted: Wed Oct 16, 2002 11:14 am    Post subject: Reply with quote

Thanks guys

You gave me some new ideas Smile
Back to top
View user's profile Send private message
vdsalchemist
Admin Team


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

PostPosted: Sat Oct 19, 2002 9:56 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
moke
Contributor
Contributor


Joined: 02 Jan 2002
Posts: 162

PostPosted: Sat Oct 19, 2002 10:06 pm    Post subject: Reply with quote

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 Very Happy

Ouch! I regret this post already Sad

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