Jump to content
News about the LabVIEW Wiki! Read more... ×
bjustice

Button text selection start end

Recommended Posts

X-POST to NI forums.  (No luck there so far.)
https://forums.ni.com/t5/LabVIEW/button-with-different-size-text/m-p/3864798/highlight/false#M1095147

I am hoping to determine if there is a programmatic method to have a button with boolean text with varying font size/color.  This is achievable with a strong control using text selection end/start.  Booleans expose these same properties in the property node... but it doesn't appear to do anything.

Even more interesting is that I can copy/paste text with varying color/size into the boolean text... and it will work.

Thoughts?  Thanks! 

 

bool_text.vi

Share this post


Link to post
Share on other sites

Well I have been one step further... it can apply the color to all, but report an error...

It it definitively a bug.

Benoit

image.thumb.png.ac4ac1c6055ebf0811384a4f9288b709.png

Share this post


Link to post
Share on other sites

Benoit,  thanks for looking at this with me.

It looks like the error that you generated there is a result of the "Vertical Arrangement" property not being allowed to be applied to boolean text.  I get the following possible reasons for that error:

image.png.ee5627c1fa7c495c9dc00e13ddb248c2.png

 

So, this is good proof that not everything in the "text property palette" is compatible with boolean text.  Which is fine, but the text select end/start should return a similar error in order to indicate the lack of support.

Also, as I said earlier, I can copy/paste text into the boolean text and have it retain properties.  Which means that the property node interface simply doesn't appear to support programmatic interaction.

image.png.a88bba3bcaa10396d50a31839162d998.png

 

 

Share this post


Link to post
Share on other sites

There's a similar (and probably related) bug when setting boolean text attributes manually:  If you select a portion of the boolean text, then use the Font menu to change something (e.g. the color), it will change all of the text, not just the selected part.  This bug showed up sometime around LV2008; it was fixed in one of the later versions; then it was un-fixed, and we still have it today.  You can get around it by making floating text and setting it the way you want, then cut-and-paste into the boolean text.  (I haven't tried programmatic cut-and-paste; maybe that would work.)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×

Important Information

By using this site, you agree to our Terms of Use.