FrancescoDiMuro Posted February 3, 2017 Posted February 3, 2017 Good morning I'm working with a popup GUI, which shows some data, that is read-only display... On the event "click on a button", I'd like to change the style of the Input to Read-only to Editable... Any suggestions? Thanks Click here to see my signature: Spoiler ALWAYS GOOD TO READ: Forum Rules Forum Etiquette
Moderators Melba23 Posted February 3, 2017 Moderators Posted February 3, 2017 FrancescoDiMuro, You use GUICtrlSetStyle to change the style of the input. 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
FrancescoDiMuro Posted February 3, 2017 Author Posted February 3, 2017 (edited) Hey @Melba23! How are you? Nice to hear you Yes, I did know how to set a style for a GUI control, but, in this case, I don't know which style I have to set to the control in order to set the input editable ( from the previous state, when I create it, that is $ES_READONLY ). $input_Codice = GUICtrlCreateInput($aDettagliArticolo[0], 73, 6, 161, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_READONLY)) GUICtrlSetState(-1, ;Here I should put a State, but I don't know which one is correct to let the $input_Codice editable ) Edited February 3, 2017 by FrancescoDiMuro Click here to see my signature: Spoiler ALWAYS GOOD TO READ: Forum Rules Forum Etiquette
Moderators Melba23 Posted February 3, 2017 Moderators Posted February 3, 2017 FrancescoDiMuro, Setting a new style overwrites the existing style - as explained in the Setting Styles tutorial in the Wiki - so all you need do is set the default style only and the input will become editable. To reset the read-only style, you need to set the combined styles as you did when creating the control. 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
FrancescoDiMuro Posted February 3, 2017 Author Posted February 3, 2017 Hey @Melba23! I forgot to tell you that I've just tried what you're telling to me, with: GUICtrlSetState($input_Codice, $GUI_SS_DEFAULT_INPUT) But, here it is what I obtain ( obviousely, the input is not editable ) Click here to see my signature: Spoiler ALWAYS GOOD TO READ: Forum Rules Forum Etiquette
Moderators Melba23 Posted February 3, 2017 Moderators Posted February 3, 2017 35 minutes ago, Melba23 said: You use GUICtrlSetStyle to change the style of the input. 3 minutes ago, FrancescoDiMuro said: GUICtrlSetState($input_Codice, $GUI_SS_DEFAULT_INPUT) Spot the difference? 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
FrancescoDiMuro Posted February 3, 2017 Author Posted February 3, 2017 Oh, dear! Now I did! What a distraction! Thanks for letting me know! Now it works like a charm Have a wonderful day Click here to see my signature: Spoiler ALWAYS GOOD TO READ: Forum Rules Forum Etiquette
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