bjustice Posted January 30, 2023 Report Share Posted January 30, 2023 Request: A button that has the "parts": 1) Boolean Button --> round shape with 6 part items 2) Boolean Glyph --> must also have 6 part items For example, the standard LED is close to what I want, but it only has 4 item states, so there is no 5/6th states for hover-over value. Taking this a bit further: The NxG buttons all have 6 item parts. However, the NxG buttons don't have a "Boolean Glyph" item part. So, naturally, I would like to understand: am I able to "import" the "boolean glyph" item part from the LED into a NxG button control? All of the forum posts that I've found thus far only document how to add decorations, or how to modify existing item parts in a control. There is no documentation on how to actually add item parts to a control... which I suspect is sorta getting into a layer of code not exposed to me. Quote Link to comment
bjustice Posted January 31, 2023 Author Report Share Posted January 31, 2023 The DMC GUI Suite has buttons that have: 1) "Boolean Button" --> 6 part items 2) "Boolean Light" --> 4 part items I can't seem to figure out how they were able to make this combination, because I can't find any control on the native palette with these item parts. For what it's worth, I'm really hoping to be able to create a custom button that has a circular click-radius, but also allows for me to important custom pictures for all 6 boolean states. Importing custom pictures into a NxG or System button control is easy to get work. What's slightly more difficult is that I'm hoping to be able to use a transparent "Boolean glyph" item part as the thing that dictates the click-bounds. That way the button doesn't appear as a circular image, with a square click bound. I recognize that there are lots of workarounds here, but I'm sorta just hoping that maybe there is some way to create the control with the item parts that I desire. This DMC button is sooooo close to being exactly what I need. Quote Link to comment
Neil Pate Posted January 31, 2023 Report Share Posted January 31, 2023 (edited) I seem to recall you do need to start with one of the controls that has 6 pictures. I played around with this years ago but cannot remember how I started. Will try and remember! Did you try the System style controls? They have 6 pictures and are editable (I think). Edit 2: Sorry I don't think I read your original post properly... Edited January 31, 2023 by Neil Pate Quote Link to comment
bjustice Posted January 31, 2023 Author Report Share Posted January 31, 2023 Here, I made a demo illustrating what I'm trying to accomplish. It's kinda cool: Note how I've been able to create a button using custom (rectangular) images, but I still have an oval click area. That way, clicking the corners does nothing. Which is good! The only thing missing: This demo button only has 4 item-parts. I really wish I could get a control with this behavior, but also with 6 item parts. (So that I can import custom images for the mouse over states.) demo round custom button.vi Quote Link to comment
Zou Posted January 31, 2023 Report Share Posted January 31, 2023 You can import boolean glyph as Decal to any button. For other controls, you can add images as long as you can set it to "slave to frame". Only LabVIEW decorations (vector image) can resize without problem. There is no way to change a 4 part items button to 6 part items button. Quote Link to comment
bjustice Posted January 31, 2023 Author Report Share Posted January 31, 2023 "You can import boolean glyph as Decal to any button" How? I can't seem to figure out any mechanism for importing an item part into a control. Quote Link to comment
ShaunR Posted January 31, 2023 Report Share Posted January 31, 2023 (edited) 15 hours ago, bjustice said: I can't seem to figure out how they were able to make this combination, because I can't find any control on the native palette with these item parts. The System Button has the mouse over images. You can't "import parts", only the images for the states. That includes if you simply want to change the mouseover colour (copy the image, paste it into an image editor, change the colour, then import it back again). The mouseover also only works while the VI is running. Edited January 31, 2023 by ShaunR Quote Link to comment
Zou Posted January 31, 2023 Report Share Posted January 31, 2023 13 minutes ago, bjustice said: "You can import boolean glyph as Decal to any button" How? I can't seem to figure out any mechanism for importing an item part into a control. Right click a glyph and copy it to clipboard. Then you can import the image as Decal. boolean glyph.ctl Quote Link to comment
bjustice Posted January 31, 2023 Author Report Share Posted January 31, 2023 Oh wow, Zou is right, you can copy item parts to clipboard, and then paste these item parts over other item parts. This seems to carry more than just a static image - this carries the item part type and properties. I'll keep poking at it with this new information, thanks. I really wish LabVIEW had a more full-featured custom control editor. Quote Link to comment
bjustice Posted January 31, 2023 Author Report Share Posted January 31, 2023 This is also how Altenback was also able to create a round color box. His instructions here: https://forums.ni.com/t5/LabVIEW/How-to-Control-color-of-each-element-in-a-cluster/m-p/236274?view=by_date_ascending#M129209 He is also importing 1 item part into another item part. It's weirdly unpredictable what importing some part types into other part types will accomplish. Quote Link to comment
ShaunR Posted January 31, 2023 Report Share Posted January 31, 2023 3 hours ago, bjustice said: this carries the item part type and properties Oh wow. I thought it was just buggy and overwriting my other images. I always used the file import because of that. 2 Quote Link to comment
Rolf Kalbermatter Posted February 3, 2023 Report Share Posted February 3, 2023 (edited) On 1/31/2023 at 7:42 PM, bjustice said: I really wish LabVIEW had a more full-featured custom control editor. That custom control editor is one of the more arcane parts of LabVIEW. It exists since at least LabVIEW 2 and has seen only small improvements since. And according to its original creator back at that time it is a pretty nasty piece of software code that would need a complete rewrite to be able to make more elaborate modifications to it. Chances for that to happen are about 0.0something % nowadays. Unless someone somewhere is willing to pour a few millions into this. 😎 Edited February 3, 2023 by Rolf Kalbermatter 1 1 Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.