RhinoCommon Rhino.UI.Dialogs.ShowTextDialog limitation

Hi,

I’m trying to display a long string with Rhino.UI.Dialogs.ShowTextDialog
however beyond a certain size, the string is no longer displayed anymore.
Any thoughts on what might cause this?

import Rhino

rl = 'fill fill fill fill fill fill fill fill fill fill fill fill \n'
message = ''
for i in range(33):
    message +=  rl

#this text shows
Rhino.UI.Dialogs.ShowTextDialog(message,'report')

message += 'add this final line and see if it shows'
#adding an addition string and it does not show again
Rhino.UI.Dialogs.ShowTextDialog(message,'report')

Thanks
-Willem

ShowTextDialog does not perform any word wrapping. If you can’t see your text, you can always resize the dialog. Otherwise, you’ll have to add your one line feeds…

Hi Dale,

Thanks for the reply,
I believe the problem has nothing to do with wordwrapping.
With the above script I get this first dialog:

Adding just one extra line to the string gets me this:

-Willem

Rhino.UI.Dialogs.ShowTextDialog is a simple wrapper for a much more robust tool. In the current implementation, you’ll be limited to 2048 chars.

http://mcneel.myjetbrains.com/youtrack/issue/RH-32654

1 Like