NI Home
Cart Cart | Help
Hello Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI
You are here: 
NI Home > NI Developer Zone > NI Discussion Forums


Reply
Member
Ken_Jones
Posts: 7
0 Kudos
Accepted Solution

Label problem when programmically changing control properties

I am trying to programmatically customize a UI form by either moving string controls on to the canvas or making them visible.  However, the label doesn't react the same as the control when programmically changing opacity, top, or left properties even when the label is locked. Is there a way to do this?  Thank you.

Member
malcolmsmith
Posts: 38
0 Kudos

Re: Label problem when programmically changing control properties

[ Edited ]

I don't think there's a way to do this, besides hiding the label. (If you hide the labels and still want matching text to go along with your controls, you could drop a plain Text element and programmatically move / fade it when you change the other controls.)

Member
Ken_Jones
Posts: 7
0 Kudos

Re: Label problem when programmically changing control properties

Is there a way to move / fade plain text elements?  I could use a string indicator but I can't get rid of the border.  There is still a gradient shadow.  I have set background, and border color to white and border width to 0 but still a shadow.  Any suggestions?

Member
malcolmsmith
Posts: 38

Re: Label problem when programmically changing control properties

You probably want "Text", not "String Indicator". There's no gradients or styling on this besides the text color / font and font thickness / etc.

 

And, you should be able to move and fade a plain text element. After you drop one from the palette on the front panel, switch to the block diagram.

Then, drop an appropriate terminal item for what you want to bind to and hook it up: For Left, Top, or Opacity, drop a Numeric > Numeric Terminal. Then in the ribbon (Terminal Tools / Configuration tab), Link To "TextBlock" and the appropriate property.

Member
Ken_Jones
Posts: 7
0 Kudos

Re: Label problem when programmically changing control properties

Awesome!  That well work.  Thanks.

By using this web site, you accept the Terms of Use for this web site. Please read these Terms of Use carefully before using any part of this site. Please go here for information on ni.com's copyright infringement policy.
My Profile | Privacy | Legal | Contact NI © 2011 National Instruments Corporation. All rights reserved.    |    E-Mail this Page E-Mail this Page