Jump to content
Melba23

Extended Message Box - New Version: 2 Aug 18

Recommended Posts

All all all! I already figured it out! Everything is already thought out in your excellent UDF! There are settings for such a case. I will now explore all its possibilities! Thanks for the tip and invention! :)

Share this post


Link to post
Share on other sites

Hi,

thanks to Melba23 for this very usefull UDF!

I have only one problem:

If I have a "&" in the string, this is missing in the Extended Message Box.
This is the only special character, that gets removed by _ExtMsgBox:

 

1991515652_2020-08-1315_00_38.png.30f3606badc278cba8c27e5a63d6f7d5.png

 

How can I prevent this removing?

I searched here in this thread and searched in the UDF, but could not find the cause.

The only way to prevent this, is to double the "&":

51412307_2020-08-1315_12_51.png.91245720435d42a10df300e9eed3f21c.png

 

But this makes it very complicated, because I would have to implement a way to add a second "&" in every string which may contain a "&".

Edit:

I solved this by adding this line before "_ExtMsgBox(...)":

$sMsg = StringReplace($sMsg, "&", "&&")

 

Edited by Trash

Share this post


Link to post
Share on other sites

Trash,

Test 3 within the Example_1 script does show how to display an & character:

Case $hButton3

            ; Set the message box right justification, colours (yellow text on blue background) and change font
            _ExtMsgBoxSet(1, 2, 0x004080, 0xFFFF00, 10, "Comic Sans MS")

            $sMsg = "This is centred on 'EMB Test' with an Exclamation icon, 2 buttons, wrapped right justified coloured text, "
            $sMsg &= "coloured background, no Taskbar button and TOPMOST set" & @CRLF & @CRLF
            $sMsg &= "Note you can get && in button text" & @CRLF
            $sMsg &= "and neither button is set as default" & @CRLF & @CRLF
            $sMsg &= "It will not time out"

            ; Use $MB_ constant
            $iRetValue = _ExtMsgBox($EMB_ICONEXCLAM, "One Way|To && Fro", "Test 3", $sMsg, 0, $hTest_GUI)
            ConsoleWrite("Test 3 returned: " & $iRetValue & @CRLF)

            ; Reset to default
            _ExtMsgBoxSet(Default)

Specifically this line:

"Note you can get && in button text"

So I did my best to explain! Glad you got it sorted.

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

 

Share this post


Link to post
Share on other sites

Hi, just a small idea I had while developping a program using my UDF GuiUtils

I needed that dynamically created dialogs to have the same font as the main GUI (parent). Why not doing this with ExtMsgBox?

I mean, the msgBox should by default have the same font as it's parent. See this function I made for this purpose.

Share this post


Link to post
Share on other sites

matwachich,

If you create the parent than you already know the font used, so just use _ExtMsgBoxSet to set that font for an ExtMsgBox which is generated.

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

 

Share this post


Link to post
Share on other sites

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...