From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Change Listbox Font Per Character (am I missing something?)

Please tell me I'm just an idiot and missed this.  Let say I have a listbox on my UI, and I want to bold the words "IF" and "THEN" to draw attention to it in a string expression shown to the user...how do I do this?

 

I can bold the whole row, but I want control like I have on a string control where I can set string Text >> Selection Start and End, and then apply the font formatting on that.

0 Kudos
Message 1 of 4
(2,538 Views)

Could it be that a ListBox acts like an "array" in that formatting is Three-Musketeers (All for One, and One for All)?  I actually tried this, but silly me, I used a Combo Box, which works just fine, thank you.  Oops, wrong question ...String Formatting.png

 

Bob Schor

0 Kudos
Message 2 of 4
(2,529 Views)

Bob_Schor a écrit :

Could it be that a ListBox acts like an "array" in that formatting is Three-Musketeers (All for One, and One for All)?  

Bob Schor


The listbox ItemNames is actually an array.

edit: The simple fact that we can't do it by editing directly portion of the listbox text (changing some letters color or making them bold) without changing the whole line formatting when LV is not running makes me believe that it is not possible.

 

Ben64

0 Kudos
Message 3 of 4
(2,503 Views)

Shame, I guess I didn't realize this wasn't even possible manually editing the text.  Things that apply to the whole text can change on a per element (like setting justify on one item, or font) but it must be the same for the whole text.

 

I made an idea exchange item for this.  Please go vote for it if you agree that more control over the appearance of text in these controls would make for a better UI control.

0 Kudos
Message 4 of 4
(2,439 Views)