Search the Community
Showing results for tags 'dynamic gui'.
-
Hello to all, my problem is to have in the same gui buttons (static and dinamically generated ones) and an edit control. The gui also adjust its height in function of button number. Below you see an ugly interface and the long buttons at the bottom are dinamically generated reading from a txt file. Because I have "static" buttons and dynamically generated ones it's not workin' well your method, also the EDIT area is updated (is a live log) and this is detected as GUI events, and this makes the guigetmsg() "dirty". Have you any ideas to make it work in better way ? I only think about creating two different GUIs to not interfere one with the other one. My code is this While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE GOLLOG("<<<< STOP <<<<") Exit #cs ; test 1 Case $iStart To $iEnd ; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< gollog(GUICtrlRead($nMsg) & ' ' & 'was pressed' & @CRLF) $iValueToWorkWith = $nMsg - $iStart ; Adjust as required gollog($iValueToWorkWith) ;ExitLoop #ce Case $buttonarray[1] To $buttonarray[UBound($buttonarray) - 1] $UMDguimsg = GUICtrlRead($nMsg) If $UMDguimsg <> 0 Then GOLLOG("ButtonText=[" & $UMDguimsg & "] was clicked") EndIf Case $Bcerca If BitAND(GUICtrlRead($idradio1), $GUI_CHECKED) = $GUI_CHECKED Then Multisearch("username-machinedescription") If BitAND(GUICtrlRead($idradio2), $GUI_CHECKED) = $GUI_CHECKED Then Multisearch("machinename-username") ;Multisearch("username-machinedescription") Case $Block lock() Case $Busergroups usergroups() Case $Bvnc VNC() Case $Icercato If BitAND(GUICtrlRead($idradio1), $GUI_CHECKED) = $GUI_CHECKED Then Multisearch("username-machinedescription") If BitAND(GUICtrlRead($idradio2), $GUI_CHECKED) = $GUI_CHECKED Then Multisearch("machinename-username") #CS Multisearch("username-machinedescription") Case Else msgbox(64,"test",GUIGetMsg()) $UMDguimsg = GUICtrlRead(GUIGetMsg()) If $UMDguimsg <> $salvaUMDguimsg Then MsgBox(64, "test2", $UMDguimsg) $salvaUMDguimsg = $UMDguimsg #CE EndIf EndSwitch WEnd Thank you , cheers,