Support Forums
What's the magic sauce to get the text to wrap in the Multi-Line Text Widget at runtime?

The text at design-time in the Multi-line text widget is wrapping, but the text is all on one line with no wrapping at runtime; how does one get the text to wrap in the Multi-line text widget at runtime?

The text at design-time in the Multi-line text widget is wrapping, but the text is all on one line with no wrapping at runtime; how does one get the text to wrap in the Multi-line text widget at runtime?

Leaving on Thursday for vacation, but I was playing with this.

What happens if you re-size the widget? Make it a little higher?

Leaving on Thursday for vacation, but I was playing with this. What happens if you re-size the widget? Make it a little higher?

Doug Spurrell

Nothing I do with the size of the Multi-Line widget or the Widget I have it a part of makes a difference. The text does not wrap for me :-(

Nothing I do with the size of the Multi-Line widget or the Widget I have it a part of makes a difference. The text does not wrap for me :-(

Can you send me a changeset, please?

support@trihedral.com

Can you send me a changeset, please? support@trihedral.com

Doug Spurrell

There are two issues here. First, the widget you drew in the changeset was a regular Text box so it would only display a single line.

The bigger problem is that the Multiline widget does not accept parameters or expressions as part of the properties, which you need for your design. I am writing that up to have it changed.

What you have to do is draw the actual multiline widget. Leave it with the default "Sample Text" for now. Set it up with the appropriate font you want to use and any other default parameters you want.

Now, at the top of the Idea Studio, on the Home tab, click the Source Code icon. This should open the widget code in Notepad (or your default text editor). If not, go to your application in File Explorer, select one of the .src files and do an Open With and select a text editor making sure to check the Always Use box. Close it here and go back to View Source.

When the code is open, scroll to the bottom. If the Multiline widget was the last thing you drew on the page it will be right at the bottom. You are looking for this -

GUITransform(175, 132, 394, 11,
               1, 1, 1, 1, 1 { Scaling              },
               0, 0          { Movement             },
               1, 0          { Visibility, Reserved },
               0, 0, 0       { Selectability        },
               Scope(\Code, "Library", TRUE)\DrawMultiText("Sample Text", 0, 1, Invalid, 3, "<00000000>"));

Since your parameter is called AnalogLabel, all you need to do is replace "Sample Text" with AnalogLabel (including the quotes). Save the file and close it. Close Idea Studio.

Go tot he Application Manager, highlight the application and click the Import File Changes button. Do this on the Application Manager and not in Application Configuration. Do not ever do this while the Idea Studio is open.

There are two issues here. First, the widget you drew in the changeset was a regular Text box so it would only display a single line. The bigger problem is that the Multiline widget does not accept parameters or expressions as part of the properties, which you need for your design. I am writing that up to have it changed. What you have to do is draw the actual multiline widget. Leave it with the default &quot;Sample Text&quot; for now. Set it up with the appropriate font you want to use and any other default parameters you want. Now, at the top of the Idea Studio, on the Home tab, click the Source Code icon. This should open the widget code in Notepad (or your default text editor). If not, go to your application in File Explorer, select one of the .src files and do an Open With and select a text editor making sure to check the Always Use box. Close it here and go back to View Source. When the code is open, scroll to the bottom. If the Multiline widget was the last thing you drew on the page it will be right at the bottom. You are looking for this - ```` GUITransform(175, 132, 394, 11, 1, 1, 1, 1, 1 { Scaling }, 0, 0 { Movement }, 1, 0 { Visibility, Reserved }, 0, 0, 0 { Selectability }, Scope(\Code, &quot;Library&quot;, TRUE)\DrawMultiText(&quot;Sample Text&quot;, 0, 1, Invalid, 3, &quot;&lt;00000000&gt;&quot;)); ```` Since your parameter is called AnalogLabel, all you need to do is replace &quot;Sample Text&quot; with AnalogLabel (including the quotes). Save the file and close it. Close Idea Studio. Go tot he Application Manager, highlight the application and click the Import File Changes button. Do this on the Application Manager and not in Application Configuration. Do not ever do this while the Idea Studio is open.

Doug Spurrell

edited Feb 8 '19 at 3:51 pm
132
7
3
live preview
enter atleast 10 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
With selected deselect posts show selected posts
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft