AutoHotkey Community

It is currently May 27th, 2012, 5:40 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: March 15th, 2010, 10:14 pm 
I've been playing with this listview script:
http://www.autohotkey.com/forum/post-44471.html#44471

It seems to be working great apart from I've change the gui to include a drop downlist.

How do I get the dropdown list to show the entry I have selected in the list view??

ie:
Code:
SMGUI:
  Gui,2:Add,Text, xm Section w80, NAME
  Gui,2:Add,Edit, ys-4 w420  vA41, %A31%
  Gui,2:Add,Text, xm Section w80  , EMAIL
  Gui,2:Add,Edit, ys-4 w420  vA42, %A32%
  Gui,2:Add,Text, xm Section w80  , WWW
  Gui,2:Add,Edit, ys-4 w420  vA43, %A33%
  Gui,2:Add,Text, xm Section w80  , COLOR
  Gui,2:Add, DropDownList, ys-4 vA44, |aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|purple|red|silver|teal|white|yellow
  Gui,2:Add, Button, xm, OK
  Gui,2:Show, , NAME-INPUT
return


name shows the name from the listview, email shows the email from the list view.. BUT how do I get COLOR to show the color from the list view ???

Thanks :)


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: March 16th, 2010, 11:27 am 
Offline

Joined: May 12th, 2009, 2:37 pm
Posts: 640
Location: Gloucester UK
I'd use GuiControl, ChooseString

There's this in the Documentation
Quote:
GuiControl, ChooseString, ControlID, String: Sets the selection (choice) in a ListBox, DropDownList, ComboBox, or Tab control to be the entry whose leading part matches String. The search is not case sensitive. For example, if a the control contains the item "UNIX Text", specifying the word unix (lowercase) would be enough to select it. The pipe and double-pipe prefix are also supported (see "Choose" above for details).


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 16th, 2010, 6:19 pm 
Thanks.

I had looked at that, but couldn't get it to work !

Can anyone help ?

Regards


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: March 16th, 2010, 6:29 pm 
Got It !!

Code:
SMGUI:
  Gui,2:Add,Text, xm Section w80, NAME
  Gui,2:Add,Edit, ys-4 w420  vA41, %A31%
  Gui,2:Add,Text, xm Section w80  , EMAIL
  Gui,2:Add,Edit, ys-4 w420  vA42, %A32%
  Gui,2:Add,Text, xm Section w80  , WWW
  Gui,2:Add,Edit, ys-4 w420  vA43, %A33%
  Gui,2:Add,Text, xm Section w80  , COLOR
  Gui,2:Add, DropDownList, ys-4 vA44, |aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|purple|red|silver|teal|white|yellow
  GuiControl, 2:ChooseString, A44, %A34%
  Gui,2:Add, Button, xm, OK
  Gui,2:Show, , NAME-INPUT
return


I missed the 2: from ChooseString !!


Report this post
Top
  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot], HotkeyStick, mrhobbeys, rbrtryn and 60 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group