CGTalk > Software > Autodesk 3ds max > 3dsMax SDK and MaxScript
Login register
Thread Closed share thread « Previous Thread | Next Thread »  
Thread Tools Search this Thread Display Modes
Old 02-06-2013, 08:28 AM   #1
New Member
Malte Dreschert
Senior Technical Artist
Bigpoint GmbH
Hamburg, Germany
Join Date: Sep 2005
Posts: 12
Messagebox size

Hi there,
I hope someone can help me with a small problem concerning the messagebox in 3DsMax 2011.
It seems, that the boxes size is dependent on the message length. But when the string is created dynamically with variables in it, the box is not large enough to hold the complete text.

Is there a way to work around this problem or do I overlook something?

Thank your very much,

Old 02-06-2013, 10:00 AM   #2
Dan Grover
Technical Director
River Film
London, United Kingdom
Join Date: Sep 2004
Posts: 355
Send a message via MSN to DanGrover
That's very strange - I have one that gets created dynamically with variables and a bunch of if statements that seems to fit fine. Is it horizontally or vertically that doesn't fit? Or both?

Old 02-06-2013, 10:21 AM   #3
isKindOf Artist
Swordslayer's Avatar
Vojtech Cada
3D generalist
Czech Republic
Join Date: Jun 2006
Posts: 441
Send a message via ICQ to Swordslayer
Strange, indeed, what about breaking the string with newlines, would that help? Does this work for you:

dnMBox = dotNetClass "System.Windows.Forms.MessageBox" dnMBox.Show "The quick brown fox jumps over the lazy dog.\n\n\n\nThe quick brown fox\njumps over the lazy dog." "Daily Pangram"

If not, something like this still won't work?

struct defaultDialogStruct ( inputText, titleText, returnVal, fn getMessageHeight msg = 17 * (filterString msg "\n" splitEmptyTokens:true).count, fn getMessageWidth msg min = amax(append (for line in filterString msg "\n" collect (getTextExtent line)[1]) min), mb = rollout mb titleText ( label lblText inputText width:(getMessageWidth inputText 100) height:(getMessageHeight inputText) pos:[10,10] button btnOK "OK" width:75 height:23 label lblPaddingBlock "" offset:[0,-12] fn init = (createDialog mb width:(getMessageWidth inputText 100 + 20) modal:true; OK) on mb open do setFocus btnOK on btnOK pressed do destroyDialog mb ), fn messageBox message title: = ( inputText = message titleText = if title != unsupplied then title else "Warning" mb.init() ) ) defaultDialog = defaultDialogStruct() defaultDialog.messageBox "The quick brown fox jumps over the lazy dog.\n\n\n\nThe quick brown fox\njumps over the lazy dog." title:"Daily Pangram"
Scripts :: linkedin
Old 02-06-2013, 10:21 AM   #4
CGTalk Moderation
CGTalk Forum Leader
Join Date: Sep 2003
Posts: 1,066,478
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
Thread Closed share thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Society of Digital Artists

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump

All times are GMT. The time now is 05:13 AM.

Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.