LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Triangle or free shape Boolean control

I like to make a Triangle or Free shape Boolean control.

Normally a control is rectangular.

Does anyone know how I can change this.

How do I get the shape points (Dots) like in a Push Button Control ?

 

I do not want to have overlapping rectangle area. See Vi.

 

With Kind Regards,

Toine

 

 

shape-control.JPG

Download All
Message 1 of 30
(6,988 Views)

Dear Toine,

 

I only discovered round (push button was originally round) or rectangle shapes. I'm still figuring out how those are arranged.

 

Best regards,

Martijn S
Applications Engineer
NI Netherlands
0 Kudos
Message 2 of 30
(6,935 Views)

Martijn S,

 

Thank for your reaction.

 

What a mean is i want to have a flexible shape like the oval button (last one from first message)

 

If possible 2 arc's and 2 Lines :

 

 

2-arcs-2-lines.JPG

 

but can also be 4 lines: (easier because only 4 movable points)

 

 

4-lines.JPG

 

 

If someone has this or knows how to make this please let me know.

 

Somewhere I read you need to have a vector based drawing program ?

 

 

With Kind regards,

Toine Roetman

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

0 Kudos
Message 3 of 30
(6,912 Views)

I would check out the UI interest group, particularly this link:

 

https://decibel.ni.com/content/groups/ui/blog/2009/05/20/a-ui-challenge-and-a-labview-response

 

If you want a vector based drawing program, Inkscape is good (and free).

0 Kudos
Message 4 of 30
(6,896 Views)

patrickpollock,

 

Thanks for your reaction.

 

I looked at the UI interest group and opened the program. It looked very promising but could not find what i wanted.

 

Maybe I was not so clear.

 

I like to have the selection area (with the mouse) to be Triangle or free shape or 4 lines.

The rectangle selection area under the green picture gives me a overlap.

So when I push the button with the mouse it is not certain that I have Right or Up.

 

 

up-right-down-left.JPG

 

 

Maybe someone saw How I can make a selection area with 4 lines instead of a rectangle.

 

 

4-lines.JPG

 

 

 

With kind regards,

Toine Roetman

 

 

0 Kudos
Message 5 of 30
(6,858 Views)

Hi Toine,


This idea of yours intrigues me, and until you mentioned it here I honestly thought you could already achieve what you need by using the alpha layer of an image. However, following some investigation, I now see that you cannot create a control with a non-rectangular detection zone.

 

I can easily see how you will encounter problems in your segmented control where their boundaries, although transparent, overlap. That which is highest in the z layer will receive the mouse click in those regions of collision.

 

I've been trying to create a control this morning that ignores mouse clicks over transparent areas, but have failed. I wonder if this is not at all possible. What I would hope for is the ability to set the control to ignore mouse clicks that occur on any transparent pixels of the embedded image. This would save you from having to define the 'detection zone' with a free shape.

Thoric (CLA, CLED, CTD and LabVIEW Champion)


0 Kudos
Message 6 of 30
(6,817 Views)

With a Picture control use the Mouse Property node.  It will tell you when the mouse is clicked inside the picture control and will give the cursor coordinates.  You would need to keep track of the images you have drawn within the picture control to determine which "button" was pressed.

 

Lynn

Message 7 of 30
(6,785 Views)
Hi Lynn,
Yes, this is a useful workaround.
However, it doesn't quite provide the look and feel of a 6-state system Boolean.

I once created a similar control to the one described by the OP with highlight effects and shadowing for the different states, which would become quite difficult using a picture control that embeds multiple non-rectangular detection zones. However, there may be no alternative here?
Thoric (CLA, CLED, CTD and LabVIEW Champion)


0 Kudos
Message 8 of 30
(6,761 Views)

I agree that trying to fully emulate the performance or look of a standard boolean with a picture control will be a lot of work, if even completely possible.

 

Lynn

0 Kudos
Message 9 of 30
(6,751 Views)

Well I gave myself a few minutes to test something and this is about as far as I could get.  I use a Picture Ring instead of a picture.  Not bad, it is fairly easy to expand to include mouse over effects.

 

PictRingButtons.png

Message 10 of 30
(6,746 Views)