TheDcoder Posted March 1, 2015 Share Posted March 1, 2015 $GUI = GUICreate("Test") $edit_box = GUICtrlCreateEdit("Test", -1, -1) GUISetState(@SW_LOCK, $edit_box) ; This is not locking the Edit Box :( GUISetState(@SW_SHOW, $GUI) EasyCodeIt - A cross-platform AutoIt implementation - Fund the development! (GitHub will double your donations for a limited time) DcodingTheWeb Forum - Follow for updates and Join for discussion Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted March 1, 2015 Moderators Share Posted March 1, 2015 TheDcoder,The edit box is a control, not a GUI - so try this: $GUI = GUICreate("Test") $edit_box = GUICtrlCreateEdit("Test", -1, -1) GUICtrlSetState($edit_box, $GUI_DISABLE) ; Now the edit control is disabled GUISetState(@SW_SHOW, $GUI)M23 TheDcoder 1 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...
TheDcoder Posted March 1, 2015 Author Share Posted March 1, 2015 Now I understand the difference between GUISetState & GUICtrlSetState Thanks Melba! You are the best EasyCodeIt - A cross-platform AutoIt implementation - Fund the development! (GitHub will double your donations for a limited time) DcodingTheWeb Forum - Follow for updates and Join for discussion Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted March 1, 2015 Moderators Share Posted March 1, 2015 TheDcoder,Glad I could help. 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...
TheDcoder Posted March 1, 2015 Author Share Posted March 1, 2015 Is there any way that I can lock it instead of disabling it? EasyCodeIt - A cross-platform AutoIt implementation - Fund the development! (GitHub will double your donations for a limited time) DcodingTheWeb Forum - Follow for updates and Join for discussion Link to comment Share on other sites More sharing options...
Developers Jos Posted March 1, 2015 Developers Share Posted March 1, 2015 Is there any way that I can lock it instead of disabling it? What is the difference in your opinion? SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
TheDcoder Posted March 1, 2015 Author Share Posted March 1, 2015 @Jos Change in colour EasyCodeIt - A cross-platform AutoIt implementation - Fund the development! (GitHub will double your donations for a limited time) DcodingTheWeb Forum - Follow for updates and Join for discussion Link to comment Share on other sites More sharing options...
Developers Jos Posted March 1, 2015 Developers Share Posted March 1, 2015 Maybe try applying the $ES_READONLY style? Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Solution TheDcoder Posted March 1, 2015 Author Solution Share Posted March 1, 2015 This is the original answer: TheDcoder, The edit box is a control, not a GUI - so try this: $GUI = GUICreate("Test") $edit_box = GUICtrlCreateEdit("Test", -1, -1) GUICtrlSetState($edit_box, $GUI_DISABLE) ; Now the edit control is disabled GUISetState(@SW_SHOW, $GUI) M23 This post helped me locking the Control: Maybe try applying the $ES_READONLY style? Jos EasyCodeIt - A cross-platform AutoIt implementation - Fund the development! (GitHub will double your donations for a limited time) DcodingTheWeb Forum - Follow for updates and Join for discussion 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