Jump to content

Recommended Posts

Posted

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

  • 3 months later...
Posted

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
Posted

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

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Posted

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.

Posted (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 by Fritterandwaste
Further question
  • Moderators
Posted

Fritterandwaste,

No probs - glad you got it working.

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...