ahmed9100 Posted September 5, 2013 Share Posted September 5, 2013 Hi All i dont know why those buttons dos not Enable > am i do something wrong ! expandcollapse popup#include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <GUIListBox.au3> #include <ProgressConstants.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> $Form1 = GUICreate("Import Users", 347, 428, 336, 131) $importproress = GUICtrlCreateProgress(8, 408, 329, 17) $Radioautowip = GUICtrlCreateRadio("Auto Import with IP", 8, 13, 121, 17) GUICtrlSetState(-1, $GUI_CHECKED) $Radiomnual = GUICtrlCreateRadio("Manual Import", 8, 38, 97, 17) $adsd = GUICtrlCreateLabel("Name", 8, 67, 32, 17) $importname = GUICtrlCreateInput("", 80, 64, 177, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_READONLY)) $asdasd = GUICtrlCreateLabel("IP address", 8, 98, 54, 17) $importip = GUICtrlCreateInput("", 80, 94, 177, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_READONLY)) $fdgtr = GUICtrlCreateLabel("MAC address", 8, 128, 67, 17) $importmac = GUICtrlCreateInput("", 80, 125, 177, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_READONLY)) $Checkboxautoip = GUICtrlCreateCheckbox("Auto IP", 272, 96, 65, 17) GUICtrlSetState($Checkboxautoip, $GUI_DISABLE) $Radioautowoip = GUICtrlCreateRadio("Auto Import without IP", 200, 14, 129, 17) $importlist = GUICtrlCreateList("", 8, 178, 329, 227) $Radiomnualwoip = GUICtrlCreateRadio("Manual Import without IP", 200, 38, 137, 17) $importadd = GUICtrlCreateButton("Add", 93, 150, 73, 25) $importdelete = GUICtrlCreateButton("Delete", 179, 150, 73, 25) $importskipe = GUICtrlCreateButton("Skipe", 264, 150, 73, 25) $importstart = GUICtrlCreateButton("Start", 8, 150, 73, 25) GUICtrlSetState($importadd, $GUI_DISABLE) GUICtrlSetState($importdelete, $GUI_DISABLE) GUICtrlSetState($importskipe, $GUI_DISABLE) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Radioautowip GUICtrlSetStyle($importname,BitOR($GUI_SS_DEFAULT_INPUT,$ES_READONLY)) GUICtrlSetState($Checkboxautoip, $GUI_DISABLE) GUICtrlSetState($importip, $GUI_DISABLE) GUICtrlSetState($importadd, $GUI_DISABLE) GUICtrlSetState($importdelete, $GUI_DISABLE) GUICtrlSetState($importskipe, $GUI_DISABLE) case $Radioautowoip GUICtrlSetStyle($importname,BitOR($GUI_SS_DEFAULT_INPUT,$ES_READONLY)) GUICtrlSetState($Checkboxautoip, $GUI_DISABLE) GUICtrlSetState($importip, $GUI_DISABLE) GUICtrlSetState($importadd, $GUI_DISABLE) GUICtrlSetState($importdelete, $GUI_DISABLE) GUICtrlSetState($importskipe, $GUI_DISABLE) Case $Radiomnual GUICtrlSetStyle($importname,$WS_TABSTOP) GUICtrlSetStyle($importip,$WS_TABSTOP) GUICtrlSetStyle($Checkboxautoip,$BS_AUTOCHECKBOX ) GUICtrlSetState($importadd, $WS_TABSTOP) GUICtrlSetState($importdelete, $WS_TABSTOP) GUICtrlSetState($importskipe, $WS_TABSTOP) Case $Radiomnualwoip GUICtrlSetStyle($importname,$WS_TABSTOP) GUICtrlSetState($importadd, $WS_TABSTOP) GUICtrlSetState($importdelete, $WS_TABSTOP) GUICtrlSetState($importskipe, $WS_TABSTOP) GUICtrlSetState($Checkboxautoip, BitOR($GUI_SS_DEFAULT_INPUT,$ES_READONLY)) GUICtrlSetState($importip, BitOR($GUI_SS_DEFAULT_INPUT,$ES_READONLY)) Case $Checkboxautoip if GUICtrlRead($Checkboxautoip) = 4 Then GUICtrlSetStyle($importip,$BS_AUTOCHECKBOX ) Else GUICtrlSetState($importip, BitOR($GUI_SS_DEFAULT_INPUT,$ES_READONLY)) EndIf EndSwitch WEnd Link to comment Share on other sites More sharing options...
ahmed9100 Posted September 6, 2013 Author Share Posted September 6, 2013 Thx Guys i got it out Case $Radiomnual GUICtrlSetStyle($importadd, 0) GUICtrlSetStyle($importname,0) GUICtrlSetStyle($importip,0) GUICtrlSetStyle($Checkboxautoip,0) ;~ GUICtrlSetState($importadd,0) GUICtrlSetState($importdelete,0) GUICtrlSetState($importskipe,0) Link to comment Share on other sites More sharing options...
ahmed9100 Posted September 6, 2013 Author Share Posted September 6, 2013 Did not work . It work only For one button and not always here is the new not working Code expandcollapse popup#include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <GUIListBox.au3> #include <ProgressConstants.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> $Form1 = GUICreate("Import Users", 347, 428, 336, 131) $importproress = GUICtrlCreateProgress(8, 408, 329, 17) $Radioautowip = GUICtrlCreateRadio("Auto Import with IP", 8, 13, 121, 17) GUICtrlSetState(-1, $GUI_CHECKED) $Radiomnual = GUICtrlCreateRadio("Manual Import", 8, 38, 97, 17) $adsd = GUICtrlCreateLabel("Name", 8, 67, 32, 17) $importname = GUICtrlCreateInput("", 80, 64, 177, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_READONLY)) $asdasd = GUICtrlCreateLabel("IP address", 8, 98, 54, 17) $importip = GUICtrlCreateInput("", 80, 94, 177, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_READONLY)) $fdgtr = GUICtrlCreateLabel("MAC address", 8, 128, 67, 17) $importmac = GUICtrlCreateInput("", 80, 125, 177, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_READONLY)) $Checkboxautoip = GUICtrlCreateCheckbox("Auto IP", 272, 96, 65, 17) GUICtrlSetState($Checkboxautoip, $GUI_DISABLE) $Radioautowoip = GUICtrlCreateRadio("Auto Import without IP", 200, 14, 129, 17) $importlist = GUICtrlCreateList("", 8, 178, 329, 227) $Radiomnualwoip = GUICtrlCreateRadio("Manual Import without IP", 200, 38, 137, 17) $importadd = GUICtrlCreateButton("Add", 93, 150, 73, 25,$BS_DEFPUSHBUTTON, $WS_GROUP) GUICtrlSetState($importadd, $GUI_DISABLE) $importdelete = GUICtrlCreateButton("Delete", 179, 150, 73, 25) GUICtrlSetState($importdelete, $GUI_DISABLE) $importskipe = GUICtrlCreateButton("Skipe", 264, 150, 73, 25) GUICtrlSetState($importskipe, $GUI_DISABLE) $importstart = GUICtrlCreateButton("Start", 8, 150, 73, 25) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Radioautowip GUICtrlSetStyle($importname,BitOR($GUI_SS_DEFAULT_INPUT,$ES_READONLY)) GUICtrlSetState($Checkboxautoip, $GUI_DISABLE) GUICtrlSetState($importip, $GUI_DISABLE) GUICtrlSetState($importadd, $GUI_DISABLE) GUICtrlSetState($importdelete, $GUI_DISABLE) GUICtrlSetState($importskipe, $GUI_DISABLE) case $Radioautowoip GUICtrlSetStyle($importname,BitOR($GUI_SS_DEFAULT_INPUT,$ES_READONLY)) GUICtrlSetState($Checkboxautoip, $GUI_DISABLE) GUICtrlSetState($importip, $GUI_DISABLE) GUICtrlSetState($importadd, $GUI_DISABLE) GUICtrlSetState($importdelete, $GUI_DISABLE) GUICtrlSetState($importskipe, $GUI_DISABLE) Case $Radiomnual GUICtrlSetStyle($importadd, 0) GUICtrlSetState($importdelete,0) GUICtrlSetState($importskipe, 0) GUICtrlSetStyle($importname,$WS_TABSTOP) GUICtrlSetStyle($importip,$WS_TABSTOP) GUICtrlSetStyle($Checkboxautoip,$BS_AUTOCHECKBOX ) Case $Radiomnualwoip GUICtrlSetStyle($importname,$WS_TABSTOP) GUICtrlSetState($importadd, 0) GUICtrlSetState($importdelete, 0) GUICtrlSetState($importskipe, 0) GUICtrlSetState($Checkboxautoip, BitOR($GUI_SS_DEFAULT_INPUT,$ES_READONLY)) GUICtrlSetState($importip, $GUI_DISABLE) Case $Checkboxautoip if GUICtrlRead($Checkboxautoip) = 4 Then GUICtrlSetStyle($importip,$BS_AUTOCHECKBOX ) Else GUICtrlSetState($importip, $GUI_DISABLE) EndIf EndSwitch WEnd Link to comment Share on other sites More sharing options...
ahmed9100 Posted September 6, 2013 Author Share Posted September 6, 2013 (edited) Auto it bug i guess #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> $Form1_1 = GUICreate("Import Users", 361, 449, 336, 131) $importadd = GUICtrlCreateButton("Add", 100, 154, 73, 25) GUICtrlSetState(-1, $GUI_DISABLE) $importdelete = GUICtrlCreateButton("Delete", 186, 154, 73, 25) GUICtrlSetState(-1, $GUI_DISABLE) $importskipe = GUICtrlCreateButton("Skipe", 271, 154, 73, 25) GUICtrlSetState(-1, $GUI_DISABLE) $importstart = GUICtrlCreateButton("Start", 15, 154, 73, 25) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $importstart GUICtrlSetStyle($importadd, 0x00010000) GUICtrlSetState($importdelete,0x00010000) GUICtrlSetState($importskipe, $WS_TABSTOP) EndSwitch WEnd The weird thing is i always use it but i didnt want to work this time i dont know Why Why Edited September 6, 2013 by ahmed9100 Link to comment Share on other sites More sharing options...
Moderators Solution Melba23 Posted September 6, 2013 Moderators Solution Share Posted September 6, 2013 ahmed9100,If you want the controls to be enabled, use $GUI_ENABLE not $WS_TABSTOP. Or have I guessed wrong and you actually have another problem? M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
ahmed9100 Posted September 6, 2013 Author Share Posted September 6, 2013 it work Great my Bad Sorry i lost My Heir in that problem i Searched for it in the HELP But i Did not find it . in the help found it now on [ GUICtrlSetState ] not [ GUICtrlSetStyle ] Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now