danyweb Posted July 31, 2011 Share Posted July 31, 2011 Hi, i've a problem with this script #include <GuiConstantsEx.au3> #include <EditConstants.au3> Global $input __set__one () Func __set__one () Local $msg GUICreate ( "Persone Presenti", 300, 200) GUICtrlCreateLabel ( "Prova", 20, 20, 260, 100) GUICtrlSetFont ( -1, 9) $input = GUICtrlCreateInput ( "", 20, 80, 50, 30, $ES_CENTER) GUICtrlSetStyle ( $input, $ES_NUMBER) GUICtrlSetFont ( $input, 16) GUICtrlSetLimit ( $input, 2) GUICtrlCreateButton ( "Ok", 150, 80, 50, 30) GUISetState () While 1 $msg = GUIGetMsg () If $msg = $GUI_EVENT_CLOSE Then ExitLoop EndIf WEnd EndFunc When i start it... i can't use the button... i don't understand why :-( Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted July 31, 2011 Moderators Share Posted July 31, 2011 danyweb,Welcome to the AutoIt forum. Your label is overlapping the other controls - so AutoIt does not know which you meant to click and so actions neither. The solution is to disable the label using GUICtrlSetState with $GUI_DISABLE. You will notice that the text of the label now turns grey - if you want the text to remain black, then you need a smaller label. All clear? 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...
AdmiralAlkex Posted July 31, 2011 Share Posted July 31, 2011 (edited) Hi and Welcome to the forums! The button is covered by the huuuuge label #include <GuiConstantsEx.au3> #include <EditConstants.au3> Global $input __set__one () Func __set__one () Local $msg GUICreate ( "Persone Presenti", 300, 200) GUICtrlCreateLabel ( "Prova", 20, 20, 260, 100) GUICtrlSetFont ( -1, 9) GUICtrlSetBkColor(-1, 0x00FF00) $input = GUICtrlCreateInput ( "", 20, 80, 50, 30, $ES_CENTER) GUICtrlSetStyle ( $input, $ES_NUMBER) GUICtrlSetFont ( $input, 16) GUICtrlSetLimit ( $input, 2) GUICtrlCreateButton ( "Ok", 150, 80, 50, 30) GUISetState () While 1 $msg = GUIGetMsg () If $msg = $GUI_EVENT_CLOSE Then ExitLoop EndIf WEnd EndFunc Edited July 31, 2011 by AdmiralManHairAlkex .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
danyweb Posted August 1, 2011 Author Share Posted August 1, 2011 thanks 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