Highlighted

ScriptUI listbox word wrap

Explorer ,
Jul 01, 2020

Copy link to clipboard

Copied

Hello all,

 

I'm not seeing this covered in Peter Kahrel's guide, or anywhere else: is there any built-in way to get word wrapping in a multi-column listbox? My current solution is to slice up the text in the 'long' column and pad out the lines in the 'short' column to match.... Seems a little hacky.

 

Edit to the above - I should specify that I'm updating the text dynamically.

 

I've noticed that statictext only wraps on multiline:true when the text is set at window creation, and I'm thinking that listbox may have the same issue? If so, is there a trick to this? statictext's wrapping goes away as soon as its updated, reverting back to a single long (clipped) line.

 

Thanks!

Topics

How to, Scripting

Views

27

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

ScriptUI listbox word wrap

Explorer ,
Jul 01, 2020

Copy link to clipboard

Copied

Hello all,

 

I'm not seeing this covered in Peter Kahrel's guide, or anywhere else: is there any built-in way to get word wrapping in a multi-column listbox? My current solution is to slice up the text in the 'long' column and pad out the lines in the 'short' column to match.... Seems a little hacky.

 

Edit to the above - I should specify that I'm updating the text dynamically.

 

I've noticed that statictext only wraps on multiline:true when the text is set at window creation, and I'm thinking that listbox may have the same issue? If so, is there a trick to this? statictext's wrapping goes away as soon as its updated, reverting back to a single long (clipped) line.

 

Thanks!

Topics

How to, Scripting

Views

28

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Have something to add?

Join the conversation