Jump to content

ExtMsgBox Ignoring "&"


Go to solution Solved by guinness,

Recommended Posts

Posted (edited)

Hello, I am using Melba23's ExtMsgBox UDF

Code:

_ExtMsgBox(64, "Test & Taste" & '|' & "Lick the Lemon", "Taste Test", "Please decide...")

Result:

post-89462-0-98590000-1427554490.png

How can I display the "&" in the first button?

Thanks in Advance, TD :)

Edited by TheDcoder

EasyCodeIt - A cross-platform AutoIt implementation - Fund the development! (GitHub will double your donations for a limited time)

DcodingTheWeb Forum - Follow for updates and Join for discussion

Posted

And the question is?

My UDFs and Tutorials:

  Reveal hidden contents

 

Posted

Can you please give us as much information as possible when posting a question?

Or do you expect us to download Melba's UDF and check the purpose of each parameter?

My UDFs and Tutorials:

  Reveal hidden contents

 

Posted

As with all other controls you should double the & to get it displayed.

My UDFs and Tutorials:

  Reveal hidden contents

 

  • Solution
Posted

Try && OR use Chr() and whatever the code is for &?

UDF List:

  Reveal hidden contents

Updated: 22/04/2018

Posted
  On 3/28/2015 at 3:04 PM, water said:

Can you please give us as much information as possible when posting a question?

 

The code used in they question is actually a decoy to make things easy

EasyCodeIt - A cross-platform AutoIt implementation - Fund the development! (GitHub will double your donations for a limited time)

DcodingTheWeb Forum - Follow for updates and Join for discussion

Posted

I tend to agree with water, before the update your issue made literally no sense. This is not the first time and surely won't be the last you post like this.

UDF List:

  Reveal hidden contents

Updated: 22/04/2018

Posted
  On 3/28/2015 at 3:13 PM, TheDcoder said:

Sorry, I will write a detailed description next time :D

I hope that's not sarcasm?!

UDF List:

  Reveal hidden contents

Updated: 22/04/2018

  • Moderators
Posted

TheDcoder,

If you look at the example scripts I provide with the ExtMsgBox UDF, the first one actually shows how to get an "&" into the button text in lines #90-106: ;)

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)
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:

  Reveal hidden contents

 

Posted

We will see when he starts a new thread ;)

My UDFs and Tutorials:

  Reveal hidden contents

 

Posted

Good job people who have helped you aren't lazy.

UDF List:

  Reveal hidden contents

Updated: 22/04/2018

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