10-11-2011 03:58 AM
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
10-14-2011 06:59 AM
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,
10-18-2011 03:02 AM
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 :
but can also be 4 lines: (easier because only 4 movable points)
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
10-18-2011 08:23 AM
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).
10-24-2011 01:11 AM
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.
Maybe someone saw How I can make a selection area with 4 lines instead of a rectangle.
With kind regards,
Toine Roetman
10-26-2011 03:33 AM - edited 10-26-2011 03:33 AM
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.
10-26-2011 02:21 PM
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
10-26-2011 03:38 PM
10-26-2011 03:54 PM
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
10-26-2011 04:05 PM
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.