LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic Buttons

Solved!
Go to solution

Yes, that does help out a lot. I decided to go with making the rectangle and the text from the picture controls vi's. Anyways I am wondering if there is a way to set a variable to be the MaxPixel, where I do not hardcode it in. So, my MinPixel would be 0(hardcoded/constant). But I want a dynamic way to set the MaxPixel to the end of the picture. thank you

0 Kudos
Message 21 of 33
(2,221 Views)

@flezt wrote:

... Anyways I am wondering if there is a way to set a variable to be the MaxPixel, where I do not hardcode it in. So, my MinPixel would be 0(hardcoded/constant). But I want a dynamic way to set the MaxPixel to the end of the picture. thank you


Pretend that Ben did not understand that at all.

 

Try to rephrase so that I can understand and include an image to illustrate the question.... please.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 22 of 33
(2,211 Views)

Yea, sometimes I can't express my thoughts into written language.. But I found what I was looking for it was in picture>>property node>>Area Width. So, it'll change dynamically correct? pixels.PNG

0 Kudos
Message 23 of 33
(2,203 Views)

It should.

 

Ben

 

PS: When you get something useful together please share some example code or lacking that... some screen shot so others can see what types of results you achieved.

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 24 of 33
(2,201 Views)

Yes Ben, I will update some screenshots of the front panel when I get done with it. But, for the code, my hands are pretty much tied up on that one as this is not for my personal use. I will try though.

Message 25 of 33
(2,193 Views)

here is a screenshot of my front panel. I have another question then this project basically should be done for now......until we get to add more parameters.

 

If I click on the picture where my "buttons" are, how can I trigger a value change so it may go into my event structure dynamicButtons.PNG

0 Kudos
Message 26 of 33
(2,189 Views)

Without seeing code it's a fairly wild stab, but I'd say you want to use the picture control's mouse up event and then 'unmap' the position to the appropriate button using the reverse of whatever code you use to place the buttons.


GCentral
0 Kudos
Message 27 of 33
(2,179 Views)

But I guess I will change some things around and post the code if you guys really want it. New blank vi, different names. For the future ofc 🙂

Message 28 of 33
(2,173 Views)
 

I tried what you said, and it deletes everything. I am uploading the code. Please let me know what I should do next. And is there a way that if a "button" overlaps, the button with higher index goes behind the one with the lower index.

0 Kudos
Message 29 of 33
(2,164 Views)

anyone?

0 Kudos
Message 30 of 33
(2,136 Views)