Jump to content

custom shaped bool control (e.g. PAC-MAN)


Recommended Posts

Hello,

is it possible to create a Boolean control, with a non square outline?

(e.g. Jigsaw , PAC-MAN , Star …)

I'm thinking about importing a picture which has transparent pixels.

The control must only respond on mouse clicks inside the control e.g. not in PAC-MAN's mouth.

How did NI create the 'Modern Style' Vertical Toggle Switch?

It has the desired behavior. I tried to customize it, but after picture import (*.PNG) the clickable area expands to the full square.

Greetings

Martin

Link to comment

I can't look at the moment, but are you sure the toggle switch only responds to clicks on itself? It's quite possible that it has a bounding rectangle which is simply close to the graphic. Anyway, even if it does, it is implemented in C using vector graphics, so you can't duplicate that exact effect. You can import vector graphics into LabVIEW, but I don't remember if it does what you want. You can see more about this here.

Link to comment

QUOTE (Yair @ Nov 9 2008, 01:16 PM)

I can confirm that for you. I have been using your technique published in the Nugget you cited with wmf files I create using PowerPoint so that I can specify the transparent color.

In fact it alomst work "too good" if your graphics are mostly transparent, you will find that it is mostly a pain to find a sweet spot.

Ben

Link to comment

Final answer from NI (USA):

German:

leider gibt es für den Endanwender keine Möglichkeit, die Konturen der Bedienelemente frei zu bedienen. Einzige Lösung ist das Überlagern des Controls mit z.B: Decorations, um die nicht aktiven Flächen zu "verstecken",

English:

Sorry but there is no way to design custom shaped controls. The only way is to use decorations in front of your control to hide nonwanted active click areas.

NI said, i should do it with an AxtiveX Control.

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
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.