 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
PaulW Guest
|
Posted: Mon Mar 15, 2010 9:14 pm Post subject: dropdown list - setting value |
|
|
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  |
|
| Back to top |
|
 |
wooly_sammoth
Joined: 12 May 2009 Posts: 634 Location: Gloucester UK
|
Posted: Tue Mar 16, 2010 10:27 am Post subject: |
|
|
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). |
|
|
| Back to top |
|
 |
PaulW Guest
|
Posted: Tue Mar 16, 2010 5:19 pm Post subject: |
|
|
Thanks.
I had looked at that, but couldn't get it to work !
Can anyone help ?
Regards |
|
| Back to top |
|
 |
PaulW Guest
|
Posted: Tue Mar 16, 2010 5:29 pm Post subject: |
|
|
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 !! |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|