How do I create a new or more lines of text when using Rhino.messagebox?


#1

How do I create a new or more lines of text when using Rhino.messagebox?
I want to create 4 lines of text not one long line.
I’m using list box now with the following:
Rhino.ListBox array("X = " & x, "Y = " & y, "Z = " & z, "X+Y+Z = " & x + y + z), “Select Dimension”, “BoundingBox Dimensions”

I like using the listbox because it doesn’t make that annoying sound when it opens, but I don’t really need to choose anything I just want 4 lines of text displayed as information.

Was it a special character to make a newline? I can’t remember if it was possible in msg box.
Thanks for any hints.
RM


#2

Vbnewline or vbcrlf?


#3

Just use:

"myfirstlinestring"&vbNewline&"mynextlinestring"&vbNewline&...  etc"

–Mitch


#4

Thanks Mitch it came to me after posting it was something like that.
:smile:
RM


#5

One wish for Rhino.message box,
Please, please can we get an option to turn off the message beep/sound.
RM


#6

I found I can use , 32 - Display Warning Query icon.
When I do this I get no sound but there is a question mark on the dialog, Maybe in the future McNeel can add another code that makes no sound and no question mark on the dialog, or maybe this is a hard coded MS thing and can’t be done?
RM


(Dale Fugier) #7

Sounds make by Windows message boxes are controlled by the specified icon. If you don’t want sounds, you can modify the sound an event makes in Control Panel. So, yes, this is a hard-coded Windows deal.