LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

customize control splits elements

Solved!
Go to solution

Hi,

I am trying to customize the color box control to make it look like a modern LED.  I have started with the classic color box and imported the led image.  I have then imported the LED modern frame.  The control looks fine and operates correctly as a color box but the two elements of the control do not resize together.  I.e. when I stretch the led I then have to stretch the frame to match.  Am I missing a something in the control editor?

I would be grateful of any suggestions.

Thank you

Michael.

0 Kudos
Message 1 of 14
(4,258 Views)
I'm sorry but I don't really understand what you're doing. Can you perhaps post your code?
0 Kudos
Message 2 of 14
(4,239 Views)

HI,

Here is my control saved in LV2009 and 8.6.  THe elements of the control are not 'grouped' as they are in the standard LED, this is what I am trying to achieve.

Thanks

Michael.

Download All
0 Kudos
Message 3 of 14
(4,233 Views)

Hi,

I have not managed to solve this problem yet!  it is driving me crazy.  I think it should be easy but i just can't see what i am doing wrong. I would apprreciate any help.

Michael.

0 Kudos
Message 4 of 14
(4,210 Views)

THe day is done for me and I have to run. 

 

Please send me an e-mail at

 

bar@dsautomation.com

 

and make SURE THE SUBJECT SAY FORUM before the end of the day today. When I come in to work tomorow, I'll take a look before I start my real job.

 

Of course if anyone else can solve this beofe tomorow they will automatically earn some Kudos for saving me the work.

 

Ben

 

 

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 5 of 14
(4,199 Views)
Solution
Accepted by topic author Michael_78

I'm sorry you had to wait but if I understand you correctly you want them to re-size together.

 

You did a nice job with what you had tried and I all I did was delete the shadow frame from the control and dropped its image seperately on the FP. I then selected both and grouped them.

 

They re-size nicely togeth now.

 

Here is the FP image and attached are the Vi and the last version of your control.

 

 

Grouped.PNG

 

I hope this helps,

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Download All
Message 6 of 14
(4,184 Views)

FYI

 

After some more thought, I am questioning why Michael's attempt did not work properly. There fore I have looged Service Request # 1444715 to investigate why the control editor does not allow the grouping required to re-size all of the objects therein.

 

Can anyone think of a Use Case where re-sizing the shadow border with the object is not desired?

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 7 of 14
(4,171 Views)

It seems like you should be able to group objects in the control editor so that they resize together.  I reported the current behavior to R&D.  I don't know that it will be changed or when it changed, but if anybody is interested in keeping an eye on the status, the CAR ID number is 194351.

Scott G.
AE Specialist
National Instruments
0 Kudos
Message 8 of 14
(4,125 Views)
The problem is you used the flat color box (I assume) instead of one which had a frame.  When you copied the shadow ring into the control, it came in as a decoration and not a frame for the control.  I started with the classic color box with a frame, and have what you want.  If you go into customize mode, you can see the difference.  In yours, the shadow ring has a dotted boundary box indicating it is a decoration for the control, where mine has a white bounding box indicating it is not a decoration (my technical terms may not be correct, but I think you'll see the difference).
0 Kudos
Message 9 of 14
(4,112 Views)

Sorry for chirping in late, but I am the one who started all this long ago. 😉

 

Yes, the scaling was never quite satisfactory, but the exact behavior changed slightly over the years and I have not really investigated in detail recently. It also works slightly more correctly if you use "import from clipboard at same size".

 

Basically, I would recommend to make the color LED control at the correct size and leave it that way, starting with an properly resized plain boolean LED.

 

What we really need is a color LED that scales exactly as a plain LED. So please support my idea here. 🙂

 

(Of course things should still scale together in the control editor in all cases, so that need to be fixed too. ;))

 

Matthew, your controls is also not perfect. For example of you resize it smaller, you see that the inner part shrinks faster than the frame, also giving an unsatisfactory global result.

Message 10 of 14
(4,105 Views)