atvaxn Posted October 17, 2020 Posted October 17, 2020 Hi all, I am trying to code a gui, which elements are created dynamically, so the gui has to be scrollable. Therefore I use Melba's Scrollbars-Library. However. When the sizes in "_GUIScrollbars_Generate($hGUI, 600, 902)" are bigger then the GUI itself it doesnt call the Function assigned to... GUI 600x900, GUIScrollbars 600x901 -> not working GUI 600x900, GUIScrollbars 600x899 -> works! Do you have a solution for me? #include "GUIScrollbars_Ex.au3" #include <GUIConstantsEx.au3> Opt("GUIOnEventMode", 1) $hGUI = GUICreate("MyApp", 1000, 900) $idInput = GUICtrlCreateInput("Input", 120, 20, 80, 25) GUICtrlSetOnEvent(-1, "__EVENTCATCHER") GUICtrlCreateUpdown(-1) _GUIScrollbars_Generate($hGUI, 600, 902) GUISetState() While 1 sleep(1) WEnd Func __EVENTCATCHER() MsgBox(64, "Info", "Message") EndFunc
Moderators Melba23 Posted October 17, 2020 Moderators Posted October 17, 2020 atvaxn, Strange things happen when you generate scrollbars in Windows! I have no idea why, but it does seem that the event is not registered once the scrollbars are generated in your script. But if you create the input AFTER generating the scrollbars everything works just fine for me. 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
atvaxn Posted October 17, 2020 Author Posted October 17, 2020 (edited) hey Melba, first, just many many thanks for your fine UDFs in general. I just love them. Simple und easy to use. 👌 For the Scrollbars, I tried to swap the orders, in many variations, but none of them made the function the run. #include "GUIScrollbars_Ex.au3" #include <GUIConstantsEx.au3> Opt("GUIOnEventMode", 1) $hGUI = GUICreate("MyApp", 1000, 900) _GUIScrollbars_Generate($hGUI, 600, 902) $idInput = GUICtrlCreateInput("Input", 120, 20, 80, 25) GUICtrlSetOnEvent(-1, "__EVENTCATCHER") GUICtrlCreateUpdown(-1) GUISetState() While 1 sleep(1) WEnd Func __EVENTCATCHER() MsgBox(64, "Info", "Message") EndFunc Edited October 17, 2020 by atvaxn
Moderators Melba23 Posted October 17, 2020 Moderators Posted October 17, 2020 atvaxn, Your script as posted works fine for me. The MsgBox appears when {Enter} is pressed and the input content has been altered - which is exactly as expected. Do you not get the same result? 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
atvaxn Posted October 17, 2020 Author Posted October 17, 2020 oh, now I know what you mean. well, I need the function to be called, as soon as the updown-arrow is clicked, not only when Enter is pressed the reason is, that I need the values in the inputbox to count up/down in smaller steps. (0 > 0.2 > 0.4....) So my idea was to call a function, which modifies the inputbox manually with predefined increasing/decreasing steps. I hope you understand what I mean
Moderators Melba23 Posted October 17, 2020 Moderators Posted October 17, 2020 atvaxn, I usually cheat like this: 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
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