BinaryBrother Posted January 15 Posted January 15 In C#, I would have to use MessageBox.Show(new Form { TopMost = true }, "A valid 10-digit phone number, including your area code, is required!", "ERROR"); SIGNATURE_0X800007D NOT FOUND
Fritterandwaste Posted yesterday at 08:40 PM Posted yesterday at 08:40 PM Hi Thanks for the UDFs. Is there a way of widening the ExtMsgBox to accommodate longer strings that contain spaces? Do I understand correctly that the first width parameter will not support a width > 370 and the second max width parameter will only kick in when the string is unbroken - ie contains no white space? Many thanks.
Moderators Melba23 Posted 14 hours ago Author Moderators Posted 14 hours ago Fritterandwaste, I am delighted you find my UDFs useful. The $iWidth parameter of _ExtMsgBoxSet determines the maximum width of the ExtMsgBox. So you can define any value over the default 370 pixels up to a maximum of @DesktopWidth - 20 and the ExtMsgBox should expand to display strings with spaces up to that width before adding linebreaks. You are correct in thinking that the $iWidth_Abs parameter is to deal with long unbroken strings. I hope that is clear - if not then please post some examples which do not work as you expect 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
Fritterandwaste Posted 11 hours ago Posted 11 hours ago Thanks for the prompt reply and clarification. That's odd because I don't seem to be getting that result. If I deliberately add a long string of consecutive underlines (a workaround I can live with), it widens the message box but not when I increase the $iWidth parameter. I'll take another look.
Fritterandwaste Posted 11 hours ago Posted 11 hours ago (edited) Yes, my problem. I forgot I was already using my own (rather lame) version of your StringLength function and adding @CRLF and a @TAB at points in an attempt to format a standard MsgBox to wrap and indent when I wanted it to and this code was restricting the character width to which ExtMsgBox was automatically adjusting. Sorry and thanks for putting me on the right track. Can I risk another question - is it possible to define the font-weight? I'd quite like to make the text bold? Edited 11 hours ago by Fritterandwaste Further question
Moderators Melba23 Posted 11 hours ago Author Moderators Posted 11 hours ago Fritterandwaste, No probs - glad you got it working. 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