10-04-2013 01:20 AM
Hello,
I search to create a button on the front since the diagram.
Is it possible ? If yes, how ?
Thanks you !!
Solved! Go to Solution.
10-04-2013 01:26 AM
Hi Slate,
Sorry but your question isn't very clear. Where do you wish to create a button?
Have you tried dragging a button onto where you want it?
10-04-2013 01:32 AM
Something like this
10-04-2013 01:35 AM
Hey OllyT !
I explain more :
First I read a table.
In this table I could have a lot differents elements : [a, b, c, d ....] but I don't know how many at the begin.
My objectiv is to create as many buttons (on the front panel) as elements in my table, but automatically, when I run the VI !
I hope it's more clear for you !
10-04-2013 01:39 AM
Slate wrote:I search to create a button on the front since the diagram.
Is it possible ? If yes, how ?
I don't know what you mean by "since", but since you mention the diagram, here's how you can create a button on the front panel while editing the block diagram. You can right-click on any terminal that accepts a boolean (e.g. the termination terminal of a while loop) and select "create control". This will create a control terminal wired to the input and the associated control on the front panel. The front panel control will be placed in a relatively random location, so double-click the terminal to find it.
10-04-2013 01:39 AM
Why dont you hide and unhide the buttons as per number of termplate used?
10-04-2013 01:41 AM
@Slate wrote:
n this table I could have a lot differents elements : [a, b, c, d ....] but I don't know how many at the begin.
My objectiv is to create as many buttons (on the front panel) as elements in my table, but automatically, when I run the VI !
You cannot dynamically create new controls at run time. I recommend to create an array of buttons instead. You can programmatically change the number of visible array elements.
10-04-2013 01:41 AM
hiding and unhiding buttons is not a great option if you'll be having any more than a few buttons...
I think this is possible with XControls, though I haven't played with them much.
Olly
10-04-2013 01:46 AM
If more numbers then as suggested use array.
10-04-2013 01:47 AM
The main problem is that I don't know how many elements I will have at the end !
That's why I can't just hide or not some buttons !
And if I unterstand well, it's the same for an array of buttons !!