n0way 0 Posted December 16, 2010 Hi, My question could seems to be stupid, and i'm used to search before posting, but I didn't find anything, neither in Help neither in Google, neither in Search modul. So i've got a Form, with 2 things, a Group and a List Global $Group1 = GUICtrlCreateGroup("MY TEXT", 120, 0, 273, 385) GUICtrlCreateGroup("", -99, -99, 1, 1) Global $List1 = GUICtrlCreateList("", 8, 8, 105, 342, BitOR($LBS_SORT,$LBS_STANDARD,$LBS_EXTENDEDSEL,$WS_VSCROLL,$WS_BORDER)) GUICtrlSetFont(-1, 8, 400, 0, "Arial") I would like to change "MY TEXT" by what i selected in my list Case $List1 $selitems2 = _GUICtrlListBox_GetSelItemsText($List1) $selected = $selitems[1] I've got that for the moment. I managed to put what i selected in a variable ... Then, i've got this idea... but i doesn't work $selected = "" Global $Group1 = GUICtrlCreateGroup($selected, 120, 0, 273, 385) GUICtrlCreateGroup("", -99, -99, 1, 1) Global $List1 = GUICtrlCreateList("", 8, 8, 105, 342, BitOR($LBS_SORT,$LBS_STANDARD,$LBS_EXTENDEDSEL,$WS_VSCROLL,$WS_BORDER)) GUICtrlSetFont(-1, 8, 400, 0, "Arial") Case $List1 $selitems2 = _GUICtrlListBox_GetSelItemsText($List1) $selected = $selitems[1] Thanks for your help, n0way EDIT : I just found a solution, but it doesn't seems to be the best method Case $List1 $selitems2 = _GUICtrlListBox_GetSelItemsText($List1) $nicknick2 = $selitems2[1] GUICtrlDelete($Group1) Global $Group1 = GUICtrlCreateGroup($nicknick2, 120, 0, 273, 385) GUICtrlCreateGroup($nicknick2, -99, -99, 1, 1) I'm still aware Share this post Link to post Share on other sites
JohnOne 1,604 Posted December 16, 2010 TRy GuiCtrlSetData() AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Share this post Link to post Share on other sites
PsaltyDS 42 Posted December 16, 2010 GuiCtrlSetData(), just like a label: #include <GuiConstantsEx.au3> $hGUI = GUICreate("Test", 300, 300) $sGroupTitle = "My Group" $idGroup = GUICtrlCreateGroup($sGroupTitle, 10, 10, 280, 280) $idList = GUICtrlCreateList("<Select Item>", 30, 30, 240, 240) GUICtrlSetData($idList, "Item 1|Item 2|Item 3|Item 4|Item 5") GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit Case Else If $sGroupTitle <> GUICtrlRead($idList) Then $sGroupTitle = GUICtrlRead($idList) GUICtrlSetData($idGroup, $sGroupTitle) EndIf EndSwitch WEnd Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Share this post Link to post Share on other sites
n0way 0 Posted December 16, 2010 Thanks ! That's perfect ! It works Perfectly ! Share this post Link to post Share on other sites
PsaltyDS 42 Posted December 16, 2010 Thanks ! That's perfect !It works Perfectly !Just tell Santa I was NICE! Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Share this post Link to post Share on other sites
n0way 0 Posted December 16, 2010 I'm sure you already have enough "nice point" in the Santa Book But i'll try to tell him if he pass in France (my home), before your country. Share this post Link to post Share on other sites