03-12-2009 04:14 PM
When using the MsgButtonTextSet to give the DIAdem standard dialog box (MsgBoxDisp) custom button text I have found that the button size does not adjust to the text if MsgButtonTextSet is enough characters to go beyond the bounds of the button size.
Is there a setting to make this button adjust to the text size or would I be limited to creating a .SUD and creating script to resize the button based on the incoming text?
This isn't a showstopper - just wondering.
03-13-2009 11:19 AM
Hello Ryan,
MsgBoxDisp (and MsgBox) are in the end windows standard message boxes. There is nearly no way to format the string you would like to display. But you can use CRLF to print the text in several rows like:
msgboxdisp("Hallo" & vbCRLF & "World")
Greetings
Walter
03-13-2009 11:43 AM - edited 03-13-2009 11:46 AM
Walter,
Thanks for the reply, but I was not talking about the Message Text - but the Button Text set by the new MsgButtonTextSet.
Using this function you can make the button text be what you want. You can easily go beyond the bounds of the button with the button text. Just wondering if there is a way to change the button size on the standard built-in DIAdem button.
With your example the Dialog Box does resize to the text entered - but if right before the MsgBoxDisp I call MsgButtonTextSet to hae custom button text.
MsgButtonTextSet("Really long text line that runs beyond the bounds of the Button")
MsgBoxDisp( "Hallo" @CRLF@ & "World" )
The button doesn't adjust to the size of the text.
Looks like I would have to use a custom SUD and handle incoming text for the button that way to resize the button.