LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

create a new button when clicking one of the button

Dear all,
 
I have an idea to write a programe in order to create a new button when I press one of the button(let's say a button callled "create button") in the front panel.
I know I can use visible and invisible to make the button appear when I press the "create button" but I want the new button can be created directly by the interface user and not by the programmer ourselves.
Actually is it possible?Smiley Surprised
 
Thanks in advance.
Io
0 Kudos
Message 1 of 13
(3,691 Views)
What will the created button do? How will the rest of the program handle the new button?

Take a look at this post: Programatically Create GUI

Robot wink
Message 2 of 13
(3,684 Views)
Thanks for your reply and the links.
Actually my case have some difference from the link that mentioned.
My case is I want the "create button" to press,then a new button will appear and the new button value will be use in the later part of the program.As a result of that, I am not just want to create the button graphically as the link have mentioned.
 
This is what I have for the problem.Smiley Sad
 
0 Kudos
Message 3 of 13
(3,674 Views)
I don't know of any other way to dynamically create a control on the user interface at run-time. You have to have the controls (buttons, dials, etc.) wired together in the block diagram before running the program or building an executable. The only ways to have controls appear and disappear is by using the hide/unhide, enable/disable, using Tabs, or placing a control underneath a picture that appears or disappears. Can you tell us more about what you are trying to do? Can you post your code, or even a drawing that explains what you want?

Robot wink
0 Kudos
Message 4 of 13
(3,658 Views)
Thanks for your reply.
Actually I just have an idea to create this kind of new program and see wheather there would have some new things to do in the LabVIEW program.
This is what I have done for the programe-- there is a button in the interface,when I right click the button,I can choose if I want to delete or add some new button on the screen.When there is a new button on the screen, then I will use the two button(the old one and the new one) to make some new logic control.
This is my idea for the program. Actually is it possible for that or the idea is too crazy?Smiley Surprised
 
Thanks in advance.
Io
0 Kudos
Message 5 of 13
(3,635 Views)

Hi. Io,

Not fuly understand what your goal is, but may be this link will be helpful for you:

http://community.ni.com/examples/linked-object-list-in-labview-8-0-using-xcontrols

best regards,

Andrey.

Message 6 of 13
(3,621 Views)

Dear Andrey,

Thank you very much for your help. The example is very useful and meaningful.The example is exactly what I am thinking about.

Thanks a lot.Smiley Wink

Io

0 Kudos
Message 7 of 13
(3,598 Views)

Io,

but when you will try to do the same with buttons, then you will get some troubles, described here:

http://forums.ni.com/ni/board/message?board.id=170&message.id=297349#M297349

May be you will found workaround for this?

anyway good luck!

Andrey.

 

0 Kudos
Message 8 of 13
(3,587 Views)
Dear Andrey,
 
Thanks for your reference link.I will make good use of it .Thanks.Smiley Wink
 
Io
0 Kudos
Message 9 of 13
(3,556 Views)
Hi IO,
 
Did this work help out with your application? Happy coding!
Amanda Howard
Americas Services and Support Recruiting Manager
National Instruments
0 Kudos
Message 10 of 13
(3,546 Views)