Moderators Melba23 Posted January 15, 2014 Author Moderators Posted January 15, 2014 mvk25,Sorry I missed those lines out of the first script - copy-paste error from the combined script I was working with all morning. 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
mvk25 Posted January 15, 2014 Posted January 15, 2014 mvk25, Sorry I missed those lines out of the first script - copy-paste error from the combined script I was working with all morning. M23 I didn't see those lines in the second example
KaFu Posted March 16, 2014 Posted March 16, 2014 Once in a while the GUI freezes for me on start-up (esp. if you click somewhere else quick after start / de-activate the GUI after it is initially show but before all frames are painted). Here's a dirty fix that works for me, un-approved by the OP . This double-call also seems to allow you to set the GUI to the show state after the frames have been painted (directly before the main loop). _WinAPI_ShowWindow($hGUI, @SW_SHOW) GUISetState(@SW_SHOW, $hGUI) OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2024-Oct-13) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Oct-13) HMW - Hide my Windows (2024-Oct-19) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2024-Oct-20) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16)
Armag3ddon Posted May 5, 2014 Posted May 5, 2014 Hi there! Can you think of a convenient way to get a callback when frame resizing is finished? Unfortunateley, WM_EXITSIZEMOVE isn't called. But something similar would be nice
Moderators Melba23 Posted May 5, 2014 Author Moderators Posted May 5, 2014 Armag3ddon,Can you explain why you wish to have a callback? 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
Armag3ddon Posted May 5, 2014 Posted May 5, 2014 I'm drawing a more or less resource-heavy picture into one of the frames (using some GDIPlus stuff). Redrawing this on every call of WM_SIZE is a bit laggy. But redrawing once after resizing has finished, is fine (I do this now on WM_EXITSIZEMOVE). The user doesn't need to see the image while resizing.
Moderators Melba23 Posted May 5, 2014 Author Moderators Posted May 5, 2014 Armag3ddon,If you declare a suitable global variable in the main script (I used Global $g_hGUIOrg = $hGUI) and add this line:_SendMessage($g_hGUIOrg, $WM_EXITSIZEMOVE, 0, 0) ; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< EndIf ; Pass the message on to org WndProc Return _GUIFrame_SepPassMsg($hWnd, $iMsg, $wParam, $lParam)at the end of the _GUIFrame_SepWndProc function, you get a notification when any frame is adjusted just as if the whole GUI were resized. Will that suffice? It looks as if it will require a fair bit more work to get the callback only when a specific frame is resized - let me have a look into that during the week. M23 Armag3ddon 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
Armag3ddon Posted May 5, 2014 Posted May 5, 2014 Many thanks! That is exactly what is was hoping for (works for me, my gui is only split once).
Moderators Melba23 Posted May 5, 2014 Author Moderators Posted May 5, 2014 Armag3ddon,Great - glad I could help so quickly. I will still look into getting a callback from only a specific frame - might come in useful for someone else. 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 6, 2014 Author Moderators Posted May 6, 2014 (edited) Armag3ddon,Here is my first attempt at a callback integrated within the UDF - you should only get a MsgBox when the green section has been resized (i.e. not when the right frame only is adjusted). Please let me know what you think:<snip>I will look today at how I might further integrate the actions into the UDF to prevent the need for so much additional code within the example. M23Edit:A much more integrated version - very limited additional code for the user. I must admit to being quite pleased with it: <snip> Edited May 7, 2014 by Melba23 See new code below 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 7, 2014 Author Moderators Posted May 7, 2014 (edited) Armag3ddon,As you wanted the ability to know when a resizing event had taken place to redraw a GDI image at the correct size, I felt that my previous approach was too complicated. If the redraw takes as long as I fear it might then you really do not want it to occur inside a handler - so why bother to create one? Instead I used the fact that the script is paused while separators are moved and the GUI resized and produced this new version which needs no further handlers:<snip>I also added code to cater for the frame being resized programmatically - press the "Set Sep" button to see that working. I hope that you now have what you need - if so I will release a new version soon. Comments from anyone else also welcome of course. M23 Edited August 10, 2014 by Melba23 Beta code removed 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 19, 2014 Author Moderators Posted May 19, 2014 [NEW VERSION] - 19 May 14Added:- 1. A new function _GUIFrame_ResizeState to indicate when frames have been resized and the resizing is complete. The idea is to help users who fill frames with elements which require heavy processing (e.g. GDI images) and where continually rewriting the content would cause severe slowdowns. The function is called in the script idle loop and returns an array of flags indicating that a resizing action is complete.- 2. A new parameter ($fShowWindow) in the _GUIFrame_Create function. A few people have found that the frames do not always appear on creation - particularly if the GUI does not have focus during this process. KaFu came up with a workaround, not approved by the AutoIt devs, using the API to confirm the frame display. Setting this new parameter to True uses the API call - use it at your own risk and peril!Fixed: A couple of minor bugs which no-one had noticed - and now never will. New code below and in the first post. M23 Armag3ddon 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
Armag3ddon Posted May 19, 2014 Posted May 19, 2014 Ah, you have been busy, I see. Another well done script from you that I use in my project! Already used Scrollbars, ExtMsgBox and just saw StringSize. You really seem to make exactly what I'm desperately in need of
Moderators Melba23 Posted May 20, 2014 Author Moderators Posted May 20, 2014 Armag3ddon,Glad you find my UDFs useful. 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
topten Posted September 3, 2014 Posted September 3, 2014 Thank you very much for this UDF. It is really great I am trying to create one horizontal and one vertical frame, but the second frame is invisible (please see the screenshot). Why? http://imgbox.com/4XPwQXaP expandcollapse popup#include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include "GUIFrame.au3" Global $iSep_Pos $hGUI = GUICreate("GUI_Frame Example 3", 500, 500, -1, -1, BitOR($WS_MINIMIZEBOX, $WS_MAXIMIZEBOX, $WS_SIZEBOX)) GUISetState() ; Create a 1st level frame $iFrame_A = _GUIFrame_Create($hGUI, 1, 50) _GUIFrame_SetMin($iFrame_A, 50, 420, True) ; This line sets the minima as absolute values <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<вер ;_GUIFrame_SetMin($iFrame_A, 50, 125) ; This line adjusts the minima to equivalent percentages on resizing <<<<<<<<<<<<<<<<<<<<< _GUIFrame_Switch($iFrame_A, 1) $aWinSize = WinGetClientSize(_GUIFrame_GetHandle($iFrame_A, 2)) ;GUICtrlCreateLabel("adv", 5, 5, $aWinSize[0] - 10, $aWinSize[1] - 10) ;GUICtrlSetBkColor(-1, 0x00FF00) GUICtrlCreateLabel("asd", 0, 0, 50, 50) ;GUICtrlSetBkColor(-1, 0x0000FF) GUICtrlSetResizing(-1, $GUI_DOCKSIZE) GUICtrlSetState(-1, $GUI_DISABLE) _GUIFrame_Switch($iFrame_A, 2) $aWinSize = WinGetClientSize(_GUIFrame_GetHandle($iFrame_A, 2)) GUICtrlCreateLabel("", 5, 5, $aWinSize[0] - 10, $aWinSize[1] - 10) ;GUICtrlSetBkColor(-1, 0xFF0000) GUICtrlSetState(-1, $GUI_DISABLE) ;$iFrame_B = _GUIFrame_Create($hGUI, 1, 50) $iFrame_B = _GUIFrame_Create(_GUIFrame_GetHandle($iFrame_A, 2), 0) _GUIFrame_SetMin($iFrame_B, 250, 250, True) GUICtrlSetState(-1, $GUI_DISABLE) ; Set resizing flag for all created frames _GUIFrame_ResizeSet(0, 2) ; Adjust the second parameter to change the resizing behaviour <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< ; Register the $WM_SIZE handler to permit resizing _GUIFrame_ResizeReg() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ; The UDF does all the tidying up as you exit Exit EndSwitch WEnd Thanx in advance!
Moderators Melba23 Posted September 4, 2014 Author Moderators Posted September 4, 2014 topten,The separator is there, but you have created a label to fill the lower frame before you create the internal frames and so the separator is hidden behind it. Just remove the section where you create the label in ($iFrame_A, 2) (lines 30-34) and the separator appears. You also have an orphan GUICtrlSetState on line 42 which is not helping matters. With those 2 changes the script works 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
topten Posted September 4, 2014 Posted September 4, 2014 (edited) LOL. Great thanx, Melba23 I found it ! PS Question #1 Just in case if you know, how can this be done? (You know those 3 points drawn on frame in skype. I show a screenshot) http://imgbox.com/GL1FJlkk Question#2 Is it possible to use scrollbars with frames as in '?do=embed' frameborder='0' data-embedContent>> I was trying to use scrollbars this way, but for some reason doesn't work. expandcollapse popup#include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include "GUIFrame.au3" #include <GuiScrollBars.au3> Global $g_hGUI = GUICreate("GUI Frames", 400,400, -1, -1, $WS_SIZEBOX) GUISetState(@SW_SHOW) ;create frames $g_Frames = _GUIFrame_Create($g_hGUI);split gui horizontally _GUIFrame_SetMin($g_Frames, 75, 75) ;get handles to each frame $g_hLeft = _GUIFrame_GetHandle($g_Frames, 1) $g_hRight = _GUIFrame_GetHandle($g_Frames, 2) ;create scrolbars _GUIFrame_Switch($g_Frames, 1) _GUIScrollBars_Init(-1) _GUIScrollBars_ShowScrollBar(-1, $SB_HORZ, False) _GUIScrollBars_SetScrollInfoMax(-1, $SB_VERT, 500) $aClient = WinGetClientSize($g_hLeft) ;$listview = GUICtrlCreateListView('column 1 | column 2 | column 3', 0, 0, $aClient[0], $aClient[1]) ;GUICtrlSetResizing(-1, 102) ;create Listview 2 _GUIFrame_Switch($g_Frames, 2) $aClient = WinGetClientSize($g_hRight) $listview2 = GUICtrlCreateListView('column 1 | column 2 | column 3', 0, 0, $aClient[0], $aClient[1]) GUICtrlSetResizing(-1, 102) ;Add some items to listviews For $i = 1 to 20 ; GUICtrlCreateListViewItem('item ' & $i, $listview) GUICtrlCreateListViewItem('item ' & $i, $listview2) Next GUIRegisterMsg($WM_SIZE, "_WM_SIZE") _GUIFrame_ResizeSet(0) Do Until GUIGetMsg() = $GUI_EVENT_CLOSE _GUIFrame_Exit() Func _WM_SIZE($hWnd, $iMsg, $wParam, $lParam) _GUIFrame_SIZE_Handler($hWnd, $iMsg, $wParam, $lParam) Return $GUI_RUNDEFMSG EndFunc Great thanx, again! Edited September 4, 2014 by topten
Moderators Melba23 Posted September 6, 2014 Author Moderators Posted September 6, 2014 topten,Ans 1: It would need a suitable label in the separator GUI - I will see if I can come up with something if I can find the time. Ans 2: I refer you to >this answer I posted a few weeks ago. Sorry not to be more helpful, but there are limits to what I will consider - and certainly in what I am capable of coding! 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
MachinistProgrammer Posted December 13, 2014 Posted December 13, 2014 This UDF divides the gui into halves. Is it possible to divide it into thirds like ISN AutoIt studio does? All my projects live on github
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