Moderators Melba23 Posted February 13, 2022 Author Moderators Share Posted February 13, 2022 (edited) mike2003, Did you bother to read the _Notify_Size function header? ; Parameters ....: $iHeight - Height in pixels of notification ; Minimum = 40 (default) ; Maximum = at least 8 notification will fit onscreen ; $iMinWidth - Minimum width of notification ; Default 160 - must be at least 4 * $iHeight ; $iMaxWidth - Maximum width of notification ; Default 320 - maximum of 10 * $iHeight You were getting an @error/@extended return of 2/1 telling you that the dimensions you had chosen did not meet those requirements (not able to fit at least 8 notifications into the screen). If I adjust the values to be within the limits I get all notifications correctly sized. _Notify_Size(100, 500, 1000) And the first one shows as the text now actually fits into the GUI - you were getting an @error/@extended of 5/1 from the _Notify_Show function which is explained in its own header: ; 5 = Title/text will not fit in widest message (@extended = 0/1 = Title/Text) Anyway, as you still only get 2 lines of text, why are you setting such a large height for the notifications? M23 Edited February 14, 2022 by Melba23 Added a bit more explanation 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...
Bitnugger Posted March 17, 2022 Share Posted March 17, 2022 Notify_Example_3.au3 Found a little bug here... ;~ $iMax = $aNotify_Data[0][1] <<== $aNotify_Data: possibly used before declaration. $iMax = $g_aNotify_Data[0][1] Notify.au3 ... For $i = 0 To UBound($g_aNotify_Settings, 2) - 1 $g_aNotify_Settings[1][$i] = $g_aNotify_Settings[0][$i] Next ... Please wrap the For...Next in a function, otherwise $i will become a global variable, which is very ugly. #include "Notify.au3" ConsoleWrite('$i = ' & $i & @CRLF) ; $i = 9 Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted March 17, 2022 Author Moderators Share Posted March 17, 2022 (edited) Bitnugger, Oops - theExample_3 version in the zip is not the one I have in my repository, which does use $g_aNotify_Data. No idea how it happened, but I will make sure the next release will contain the correct example script. The loop variable $i will not become a Global variable - as explained in the Help file for For...To...Step...Next: Quote The variable will be created automatically with Local scope, even when MustDeclareVars is on M23 Edit: Ah, I see the loop is actually in the main script, so that will probably not be the case. However, I really do not think is is a big deal as $i is pretty commonly used for loop variables and will be reinitialised each time a For..To...Step...Next loop is set up. Plus anyone who uses $i as a standard variable name is not being very sensible. However, now you have brought it to my attention I will change the loop variable to $g_iNotifyCounter so that it is unlikely to cause a problem. Edited March 17, 2022 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 Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted March 17, 2022 Author Moderators Share Posted March 17, 2022 [NEW VERSION] - 17 Mar 22 Added: A new function _Notify_Size which allows you to adjust the size of the notification from its default 160x40. Please read the function header to see the max/min sizes that you can set for the width and height - the function returns informative @error/@extended values if these are not respected. Regardless of the size set, each notification will still display only 2 lines of text with the size of font used set automatically by the UDF. New UDF in the 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 Link to comment Share on other sites More sharing options...
mike2003 Posted November 6, 2022 Share Posted November 6, 2022 Hi again. I am trying to re-enable this module for myself. How to increase the size? I want to see text bigger. But none of the options _Notify_Size() work. And there is nothing in the examples. Help me. Link to comment Share on other sites More sharing options...
mike2003 Posted November 6, 2022 Share Posted November 6, 2022 wow I understand! you have a check inside, it is crooked and with an error, but I figured out how to get around this after experiments. but it's complicated and incomprehensible until you look at the code. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted November 6, 2022 Author Moderators Share Posted November 6, 2022 mike2003, Obviously a project of some importance seeing it was 9 months ago that you asked me to fix the sizing problem! Did you read the post I made at the top of this page where I explained in some detail why your own example did not work and gave you the required fix? Quote you have a check inside, it is crooked and with an error Charming! Just what do you not like about the changes I made in the new(ish) version of the UDF? Perhaps you could take the time to tell us just what is wrong (in your eyes) and how it might be "improved". Over to you, M23 Jos 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...
mike2003 Posted November 6, 2022 Share Posted November 6, 2022 $iHeight = 71 $e = _Notify_Size($iHeight, 4 * $iHeight, 10 * $iHeight) $e = error in iMaxWidth step (Force to even) ---- Truncate title/text must be OFF default. It is always better to show than not to show for minimal settings. Otherwise, the whole message simply disappears. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted November 6, 2022 Author Moderators Share Posted November 6, 2022 mike2003, For the first of your cryptic messages, I presume you are complaining that the $iHeight value is forced to an even number within the function which means that the function fails as $iMaxWidth is now more than 10 times the original odd value of $iHeight. I chose to force the height parameter of this function to an even number to simplify the later drawing of the Notification - both lines will be the same size when the height is even. By setting the values for min/max width of the Notification to the absolute limit you have found an edge case which I will look into to see if it can be resolved - although the final solution may be as simple as adding a warning that odd $iHeight values will be rounded up. As to the second, the _Notify_Show function returns an @error/@extended pair to tell you that the required string will not fit in the Notification. I disagree that the current behaviour should be altered - the user can easily change the function behaviour by using the $bProc parameter in a _Notify_Set call and the function failure is quite clearly shown by the return value. M23 Musashi 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...
mike2003 Posted November 7, 2022 Share Posted November 7, 2022 (edited) Never mind, it's your choice. But it's uncomfortable. Edited November 7, 2022 by mike2003 Link to comment Share on other sites More sharing options...
MaximusCZ Posted November 8, 2022 Share Posted November 8, 2022 It would be splendid if OP included some screenshots Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted November 8, 2022 Author Moderators Share Posted November 8, 2022 MaximusCZ, Just download the UDF zip and run the examples! 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...
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