LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

hiding and enabling button and controls

hello,
 
having a hard time doing some things im sure are really simple
 
1. my main program runs inside a while loop.
those parameters which are outside the loop, cant be changed once the programming is running in the loop.
I would like to grey out the "control" for these items during run time, can this be done?
 with other OO langages, its done with somelike like, object.enabled = false
 
2.  I have a buttons which i want to sit on the edge of a chart that they control.
  On some of the buttons, they sit on top of the chart, on others, the chart is on top and the button falls under it.
  Is there a way to control the order in which they reside?
  For example, i know some other programs  have "always on top" features
 
3.  I have categories of large amounts of indicators.
    I would like to bundle them them up and hide at one time and then show them duing another, at run time of course.
   Otherwise, i have 100 controls, only half that can be used at one time showing at all times
 
 
 
0 Kudos
Message 1 of 14
(4,423 Views)


jimmyinCT wrote:
 
those parameters which are outside the loop, cant be changed once the programming is running in the loop.
I would like to grey out the "control" for these items during run time, can this be done?

Create a property node for the object and select property "disabled". Now wire a 0,1,or 2 to it. Check the context help for details (ctrl+h).


jimmyinCT wrote:
2.  I have a buttons which i want to sit on the edge of a chart that they control.
  On some of the buttons, they sit on top of the chart, on others, the chart is on top and the button falls under it.
  Is there a way to control the order in which they reside?
  For example, i know some other programs  have "always on top" features

I would stay away from overlapping objects, because it might hurt performace, but select your desired object then click "reorder" button. See what happens. 😄




jimmyinCT wrote:
 
3.  I have categories of large amounts of indicators.
    I would like to bundle them them up and hide at one time and then show them duing another, at run time of course.
   Otherwise, i have 100 controls, only half that can be used at one time showing at all times

You can place groups of controls inside cluster containers. You can also use a tab control to only show a certain group of related front panel objects at any time..


Message Edited by altenbach on 02-17-2008 11:19 AM
0 Kudos
Message 2 of 14
(4,416 Views)


jimmyinCT wrote:
hello,
 
having a hard time doing some things im sure are really simple
 
1. my main program runs inside a while loop.
those parameters which are outside the loop, cant be changed once the programming is running in the loop.
I would like to grey out the "control" for these items during run time, can this be done?
 with other OO langages, its done with somelike like, object.enabled = false

Right-click on a FrontPanel (FP) control/indicator and choose Create\Property node.  Check-out the "Disabled" property - a value of "2" makes a control Disabled and Greyed
 

2.  I have a buttons which i want to sit on the edge of a chart that they control.
  On some of the buttons, they sit on top of the chart, on others, the chart is on top and the button falls under it.
  Is there a way to control the order in which they reside?
  For example, i know some other programs  have "always on top" features

After placing an object on the FP, select it and use Ctrl-J to move it "behind" other objects, and use Ctrl-K to move it "forward".  Each FP object has a unique precedence on the FP - pressing Ctrl-K enough times will make it top-most.

 
3.  I have categories of large amounts of indicators.
    I would like to bundle them them up and hide at one time and then show them duing another, at run time of course.
   Otherwise, i have 100 controls, only half that can be used at one time showing at all times
Keeping the diagram clean is a good idea, and bundling related/similar FP objects is a great way.  When you start talking about showing/hiding many controls, individual property nodes can be cumbersome.  It's possible to change control-properties via their "reference" as well.  One way to handle this situation might be to put all the FP controls in a cluster, obtain the array of control-references ("Controls[]" property of cluster), and change the cluster's member's that way.  Unfortunately, that means having to know - or determine - the array-index of a specific control within the cluster.  It's possible to find the right reference (within "Controls[]") by checking the label-text associated with each reference in the references array.
 
Probably need more specifics here!
 
Cheers!
"Inside every large program is a small program struggling to get out." (attributed to Tony Hoare)
0 Kudos
Message 3 of 14
(4,414 Views)

you guys are great

many thanks

0 Kudos
Message 4 of 14
(4,401 Views)

 

 

something funny is gonig on wtih property node

if i select the visible property node, the control is hidden at run time

that is expected.

 

yet, if i remove everything and start all over with a new file, and try the "disabled node", i get a broken wire.

does the disabled attribute of property nodes not apply to controls?

i just want to grey it out or lock the control it so it cant be changed, not make it invisible.

 



Message Edited by jimmyinCT on 02-17-2008 04:20 PM
0 Kudos
Message 5 of 14
(4,393 Views)
Maybe you need to change the node to "write"? try right-clicking.
0 Kudos
Message 6 of 14
(4,388 Views)

to get the visible property node to work, i  had to chnage that to write.

somhow, this enabled property node does not seem to take the boolean value, either as read or write

 

0 Kudos
Message 7 of 14
(4,385 Views)

nevermind.. i got it

 

the visible property node takes a boolean input

the disabled property node, as was said earlier, takes an integer input from 1-3

 

pretty odd though, they are both still teh same basic property node.

0 Kudos
Message 8 of 14
(4,384 Views)

anotehr oddity is  is that after i delele teh property  node, the control retains the property, even after i shut down labview

 

0 Kudos
Message 9 of 14
(4,379 Views)
still having a hard time here.
 
so i want to gray out all the controls that are not inside my main loop
They cant be changed during run time.
But they can be changed before teh start execution.
 
If the property node enabled attribute is left to 2 (not enabled), then after the program is halted, it is not editable.
There seems to be nothing to use for a switch
If i link it to any of the boolean inside the main loop, they dont execute until after this has so it wont work.
 
 
 
0 Kudos
Message 10 of 14
(4,378 Views)