Jump to content

Creating system numeric with adjustable background color


Recommended Posts

Normally, when you use system controls, you are stuck with system colors and cannot change them. LV produces an error if you try. However, using some inspiration from the JKI guys, I was able to create a set of text contols (simple string and a combo box) where I can adjust the background color of the text. I did this by modifying the classic equivelent with some system control components and some gymnastics. The result can be seen below:

post-7607-1206632343.png?width=400

Download File:post-7607-1206632349.vi (LV 8.2)

However, there is also a simple numeric (included in the above VI) that I wish to exhibit the same behavior. That is, I want it to look like a system numeric, but have adjustable background color like the text-based objects. Unfortunately, I haven't been able to accomplish this.

Can anyone get the numeric in the above VI to act like the other text-based objects?

Link to comment

QUOTE (Yuri33 @ Mar 27 2008, 10:44 AM)

Normally, when you use system controls, you are stuck with system colors and cannot change them. LV produces an error if you try. However, using some inspiration from the JKI guys, I was able to create a set of text contols (simple string and a combo box) where I can adjust the background color of the text. I did this by modifying the classic equivelent with some system control components and some gymnastics. The result can be seen below:

post-7607-1206632343.png?width=400

Download File:post-7607-1206632349.vi (LV 8.2)

However, there is also a simple numeric (included in the above VI) that I wish to exhibit the same behavior. That is, I want it to look like a system numeric, but have adjustable background color like the text-based objects. Unfortunately, I haven't been able to accomplish this.

Can anyone get the numeric in the above VI to act like the other text-based objects?

The simple Numeric has not a separate housing and text area. That makes it impossible to replace the housing with the system style frame since it isn't there. Taking a normal numeric instead and replacing its housing should work although there you have additional troubles with the increment and decrement buttons and making the housing and numeric text box area match nicely in size is a bit of a hassle too.

Rolf Kalbermatter

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

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