Moderators Melba23 Posted September 17, 2020 Author Moderators Posted September 17, 2020 (edited) Siwa, My thought was to load the names from the Excel file into a simple ListView - then Windows looks after the scrolling for you. When an item is selected, you could pop up a dialog with all the resource-heavy controls which the user can manipulate as required and then the resulting settings would be applied to the selected element. M23 P.S. If you do decide to go that way then I will move this all into a separate thread as my UDF will no longer be involved. Edited September 17, 2020 by Melba23 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
Siwa Posted September 24, 2020 Posted September 24, 2020 (edited) Yes you can delete the replies. But I think you can leave one behind, letting others know if a huge amount of data is loaded once, it may make he GUI freeze with the scrollbar. PS : Can I ask you again for your help ? I found another solution for my problem, and it might not be 100% related to this topic, But I'm suck in loading different range of names into different tabs when clicked. or you suggest I open a new topic, maybe it might help someone else. Edited September 24, 2020 by Siwa
Guy_ Posted October 23, 2020 Posted October 23, 2020 (edited) Haven't read comments if this was mentioned before (or if I'm doing something wrong), but a possible bug I've found is that, for example, when the scroll position locator is low (in the image it's at the bottom), you then click the taskbar icon to hide all windows (Show desktop), and then you activate the window with your scrollbar again and you scroll up, all that content is gone... Update: Just noticed a similar problem so I could study that first ... Edited October 23, 2020 by Guy_ added Update
Moderators Melba23 Posted October 23, 2020 Author Moderators Posted October 23, 2020 Guy_, And did studying that thread help solve your problem? If not, then please post the code you are using and I will take a look. 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
Guy_ Posted October 23, 2020 Posted October 23, 2020 1 minute ago, Melba23 said: And did studying that thread help solve your problem? Only just found it and may have time this evening to get back to you. TIA! Not a huge problem anyway — just not ideal.
Guy_ Posted October 23, 2020 Posted October 23, 2020 (edited) 16 hours ago, Melba23 said: And did studying that thread help solve your problem? Yes, I've got it properly solved. Essentially, it seems I just needed to insert and change this bunch of lines a bit ... Case $GUI_EVENT_MAXIMIZE, $GUI_EVENT_RESTORE ... Have a great weekend! Edited October 24, 2020 by Guy_
Efo74 Posted May 1, 2021 Posted May 1, 2021 Hello Autoit Team, I'm doing something wrong or when I use the function $aCoord = _GUIScrollbars_Locate_Ctrl($frm_Test,10,450) with only the horizontal scrollbar activated in the form it returns @error with value 2 : 2 - Parameter error. In my window I prefer not to have vertical scrollbar. Thank you for the support. :rolleyes:
Moderators Melba23 Posted May 1, 2021 Author Moderators Posted May 1, 2021 Efo74, I will try and see what I can do with the information you have given me, but please post a runnable script which shows the error. 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
Efo74 Posted May 1, 2021 Posted May 1, 2021 Sorry, I'll give you a brief example of the problem ... in this case error returns 0. Only with horizontal scoll. if there is vertical scollbar, all is ok. expandcollapse popup#include-once #include <GUIConstantsEx.au3> #include <Constants.au3> #include <WindowsConstants.au3> #include <StaticConstants.au3> #include <GUIScrollbars_Ex.au3> #include <array.au3> HotKeySet("{F10}","ChangeButtonPosition") Global $frm_Test,$btn_firstbutton frm_Test() ;***************************************************************************************************************************************************************************** Func frm_Test() ;***************************************************************************************************************************************************************************** $frm_Test = GUICreate("Test",600,500) GUISetBkColor($COLOR_BLACK) $btn_firstbutton = GUICtrlCreateButton("TEST",10,10,100,40) _GUIScrollbars_Generate($frm_Test,600+200,490,0,0,False) GUISetState(@SW_SHOW) While True $nMsg = GUIGetMsg() if $nMsg=$GUI_EVENT_CLOSE Then ExitLoop Wend GUIDelete($frm_Test) Return 0 EndFunc ;***************************************************************************************************************************************************************************** Func ChangeButtonPosition() ;***************************************************************************************************************************************************************************** $aCoord = _GUIScrollbars_Locate_Ctrl($frm_Test,10,10) if Not IsArray($aCoord) Then MsgBox(0,"Error",@error) Else MsgBox(0,$aCoord[0],$aCoord[1]) GUICtrlDelete($btn_firstbutton) $btn_firstbutton = GUICtrlCreateButton("TEST",$aCoord[0],$aCoord[1],100,40) EndIf EndFunc :rolleyes:
Moderators Melba23 Posted May 1, 2021 Author Moderators Posted May 1, 2021 Efo74, Thank you for that report. i believe I have fixed the problem - could you please try this Beta code and see if it works for you: GUIScrollBars_Ex_Test.au3 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
Efo74 Posted May 1, 2021 Posted May 1, 2021 Thank you so much. Now it works perfectly. You are my Hero :rolleyes:
Moderators Melba23 Posted May 1, 2021 Author Moderators Posted May 1, 2021 Efo74, Delighted I could solve it so quickly! 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
Moderators Melba23 Posted May 2, 2021 Author Moderators Posted May 2, 2021 [BugFix Version] - 2 May 21 Fixed: Getting existing control positions no longer errors if a scrollbar is not activated. New UDFs, examples in first post. 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
Efo74 Posted May 2, 2021 Posted May 2, 2021 Thanks !!!! for your hard work. I use your UDFs on a daily basis. :rolleyes:
Moderators Melba23 Posted May 2, 2021 Author Moderators Posted May 2, 2021 Efo74, So glad you find my UDFs useful - thanks for taking the time to say so. 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
Letraindusoir Posted June 13, 2021 Posted June 13, 2021 (edited) expandcollapse popup#include <GUIScrollBars_Ex.au3> $iLeft = 5 $iTop = 40 $iWidth = 100 $iHeight = 25 $iSpacing = 30 $hGUI = GUICreate('scroll window', 600, 500, -1, -1, BitOR($GUI_SS_DEFAULT_GUI, $WS_MAXIMIZEBOX, $WS_MINIMIZEBOX)) GUISetBkColor(0x000000,$hGUI) $hGUI2 = GUICreate("", 488, 464, $iLeft, 26, $WS_POPUP, $WS_EX_MDICHILD, $hGUI) For $i = 1 To 50 GUICtrlCreateLabel('Label ' & $i, $iLeft, $iTop, $iWidth, $iHeight) GUICtrlSetBkColor(-1, 0xFFFFFF) GUICtrlSetResizing(-1, $GUI_DOCKALL) $bot = $iTop + $iHeight $iTop = $bot + $iSpacing Next $cButton = GUICtrlCreateButton("Maximize", 400, 40, 50, 30) $iMaxScrollHeight = $iTop _GUIScrollbars_Generate($hGUI2, 0, $iMaxScrollHeight) GUISetState(@SW_SHOW, $hGUI) GUISetState(@SW_SHOW, $hGUI2) GUIRegisterMsg($WM_SIZE, "_WM_SIZE") While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit Case $cButton GUISetState(@SW_MAXIMIZE) EndSwitch Wend Func _WM_SIZE($hWnd, $iMsg, $wParam, $lParam) #forceref $iMsg, $wParam, $lParam If $hWnd = $hGUI Then Local $aGUI_Size = WinGetClientSize($hGUI) WinMove($hGUI2, "", Default, Default, ($aGUI_Size[0] - 14), ($aGUI_Size[1] - 34)) If $aGUI_Size[1] < $iMaxScrollHeight Then _GUIScrollbars_Generate($hGUI2, 0, $iMaxScrollHeight) EndIf EndIf EndFunc ;==>_WM_SIZE As shown in the above code, after the parent GUI sets the background, it finds that the blank above and below the vertical scroll bar is relatively wide. Just a little question, which can be ignored. Edited June 13, 2021 by Letraindusoir
Moderators Melba23 Posted June 13, 2021 Author Moderators Posted June 13, 2021 Letraindusoir, If you tell AutoIt which GUI you want to maximize, the scrollbars size correctly: Case $cButton GUISetState(@SW_MAXIMIZE, $hGUI) Otherwise it is the child who gets maximized and the scroll resizing calculations based on the size of the main GUI give the wrong answer - as shown by the results you got. 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
Efo74 Posted November 21, 2021 Posted November 21, 2021 Hello everyone, I have a problem with the sample source code: #include <GuiConstantsEx.au3> #include <GUIScrollbars_Ex.au3> ; Create GUI with red background $hGUI = GUICreate("Test", 500, 500) GUISetBkColor(0xFF0000, $hGUI) ; Create a 1000x1000 green label GUICtrlCreateLabel("", 0, 0, 1000, 1000) GUICtrlSetBkColor(-1, 0x00FF00) GUISetState() ; Generate scrollbars - Yes, this is all you need to do!!!!!!!!!!!!!!!!!!!! _GUIScrollbars_Generate($hGUI, 1000, 1000) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit Case $GUI_EVENT_RESTORE,$GUI_EVENT_MAXIMIZE _GUIScrollbars_Restore($hGUI,True,True) Case $GUI_EVENT_MINIMIZE _GUIScrollbars_Minimize($hGUI) EndSwitch WEnd 1) I run the script 2) I position the scrollbars at the maximum of x and at the maximum of y (in this way I see the red stripes) 3) Minimizing and maximizing the form all OK 4) However, if I press the "Show desktop" WIN + D key for example and then return to the form, I find myself the same condition as if I did not manage the Minimize and Maximize, that is, I find the scrollbars moved correctly, but the controls inside of the form are moved non correctly. 5) Is there a way to handle the "event" of the "Desktop show" so I can Make a _GUIScrollbars_Restore($hGUI,True,True) ? Thank you for the support. :rolleyes:
Moderators Melba23 Posted November 21, 2021 Author Moderators Posted November 21, 2021 Efo74, Quote Is there a way to handle the "event" of the "Desktop show"[...] ? No idea - but I will start looking! 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
Efo74 Posted November 21, 2021 Posted November 21, 2021 Thanks Melba23 for your help, these are the problems that make me angry, because I can't understand how to solve them. The problem is not very serious, as by minimizing or maximizing the window the form returns to its place correctly. I thought I could handle events for the form when it is active or inactive, I'm running tests ... :rolleyes:
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