LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

One pixel frame for picture control

Hello

How can I create a picture control with a frame of one pixel (instead of 3 pixels by default)?

I would like it to look similar to a Classic Boolean Flat Square Button.

And if possible it would be nice to be able to change the color of this frame with the brush or a property node.

Thank you

0 Kudos
Message 1 of 11
(4,564 Views)

Place down the Classic boolean.

Customize it. 

Change to customize mode.

Show parts window and select the border.

Copy it to the clipboard and close editor.

Place down a picture control and customize it

Show the parts window and again select the border.

Right click it and Paste from Clipboard at same size.

 

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
0 Kudos
Message 2 of 11
(4,545 Views)

APutman --

     I was about to give your post a Kudo (I'd looked at this, briefly tried to Customize the Control, quickly abandoned the attempt, but said "Glad someone figured it out!"), but decided to test it first.

     Getting the 1-pixel border from the Classic Boolean Control is easy (and an elegant idea!).  However, when I placed a 2D Picture Control (from LabVIEW 2016), there was no "Customize" setting that I could find.  I don't have 2012 on my laptop -- is this something that "used to be there", and now isn't?  Or am I just being foolish/forgetful?

 

Bob Schor

0 Kudos
Message 3 of 11
(4,502 Views)

I can customize the 2D Picture control and I have access to the part named "Frame".

However I did not manage to extract the frame of the Classic Boolean Flat Square Button, when I customize it I have only one part.

 temp.png

LabVIEW 2016

0 Kudos
Message 4 of 11
(4,484 Views)

Bob,

I was having a similar problem (the customize option was greyed for me...in the advanced submenu) until I realized that the customize window was already opened for another control.  Apparently you can only customize one control at a time.

 

awilliotAcutronic,

Yes there are only two parts on the flat boolean and that is the part that you want to use.  I've attached my version of the control.  You may need to play with the dimensions of the Picture Area part because it is currently sized for a thicker border.  With a 1px border in the same location, there is a small 3-5px white "margin" around the control where you can't draw anything.  You can see it in the upper left corner of this screenshot.

Capture.PNG

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
0 Kudos
Message 5 of 11
(4,478 Views)

@aputman:

> there is a small 3-5px white "margin" around the control where you can't draw anything.

Use a frameless Picture ctrl, add a decor frame won't have this problem.

Untitled.png

 

George Zou
Message 6 of 11
(4,464 Views)

@zou wrote:

Use a frameless Picture ctrl, add a decor frame won't have this problem.

 

 


Never heard of a frameless Picture Control.  In LabVIEW 2016 (my current "working" version), I can't find it, only the 2D Picture Control (under Graphs) which has the 3-pixel frame "built-in".  Also, I just found that "Customize" now is not grayed out (thanks, aputman) ...

 

Bob Schor

0 Kudos
Message 7 of 11
(4,450 Views)

Never heard of a frameless Picture Control.

It's not shipped with LabVIEW.

I forgot where I downloaded it.  Probably from UI Interest group.

It was used in a 2D array of Picture ctrls to create a mosaic picture.

 

George Zou
Message 8 of 11
(4,445 Views)

On the FP....

 

Classic >>> Classic Graph >>> Controls >>>

 

Selecta 2d Picture

 

Switch to the paint brush and while over the border select the "T" for transparent.

 

That will give you a borderless picture indicator.

 

Ben 

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 9 of 11
(4,442 Views)

Very clever -- I didn't think about "Transparenting" elements I couldn't edit ...

 

BS

0 Kudos
Message 10 of 11
(4,437 Views)