Let picture ring behave like boolean control 
Author Message
 Let picture ring behave like boolean control

I want to create a picture ring that behaves like a boolean control.
When clicked on, it shouldn't display a list of possible states, but
just skip to the next state.  The scroll buttons shouldn't be used.

Or a boolean control that works like an enum.  I know this sounds
confusing, but my bool ctrls doesn't work the way they should when
connected to certain datasources.  All numeric ctrls and enums work
fine.

How do I change the behaviour of a control?



Thu, 19 May 2005 21:21:58 GMT  
 Let picture ring behave like boolean control
The simplest way I can think of is to customize a boolean control,
replacing the TRUE and FALSE pictures by images of your own, and direct
the output to a "Select" vi that will choose between whatever two data
of the same type you actually want to use.

It sounds attractive to encapsulate the selection in the actual control
object "read value" method, but there is no simple way to do this in
labview. So using the solution above should fit your need if your
program doesn't require a a lot of instances of the control to be read
and modified around frequently.

tfd a crit:

Quote:
>I want to create a picture ring that behaves like a boolean control.
>When clicked on, it shouldn't display a list of possible states, but
>just skip to the next state.  The scroll buttons shouldn't be used.

>Or a boolean control that works like an enum.  I know this sounds
>confusing, but my bool ctrls doesn't work the way they should when
>connected to certain datasources.  All numeric ctrls and enums work
>fine.

>How do I change the behaviour of a control?



Fri, 20 May 2005 21:32:11 GMT  
 Let picture ring behave like boolean control
Quote:
> I want to create a picture ring that behaves like a boolean control.
> When clicked on, it shouldn't display a list of possible states, but
> just skip to the next state.  The scroll buttons shouldn't be used.

...

Quote:
> How do I change the behaviour of a control?

Two ways.  If you really have two states, then customize the Boolean
button using the control editor as stated in the other post.

If you have more than two states, then the Boolean shouldn't be the
indicator, as it only has two values, but you can still use it as the
control the user interacts with.  Place a ring control on the panel,
make it an indicator, and cover it with a Boolean button that you then
make mostly or completely transparent.  You may also want to select and
group them together.  On the diagram you can read the button value
changes using either polling or events (with 6.1), and you can update
the value of the ring to the appropriate state.

Greg McKaskle



Fri, 20 May 2005 21:48:36 GMT  
 Let picture ring behave like boolean control

For more than two values, the event structure even makes it possible to
actually use only a simple pict ring control.
Catching the "Mouse Down" event, you can use the control ref to update
the ring value (basically taking mod(currstate+1,nbstates)), update any
alternate type/value alias variable, and also discard the event to hide
the pop-up selection that will remain otherwise.

That's neat but the diagram size will grow along with the number of
these you want to use... - oz

Greg McKaskle a crit:

Quote:
>> I want to create a picture ring that behaves like a boolean control.
>> When clicked on, it shouldn't display a list of possible states, but
>> just skip to the next state.  The scroll buttons shouldn't be used.

>> How do I change the behaviour of a control?

> Two ways.  If you really have two states, then customize the Boolean
> button using the control editor as stated in the other post.
> If you have more than two states, then the Boolean shouldn't be the
> indicator, as it only has two values, but you can still use it as the
> control the user interacts with.  Place a ring control on the panel,
> make it an indicator, and cover it with a Boolean button that you then
> make mostly or completely transparent.  You may also want to select
> and group them together.  On the diagram you can read the button value
> changes using either polling or events (with 6.1), and you can update
> the value of the ring to the appropriate state.
> Greg McKaskle



Fri, 20 May 2005 22:06:36 GMT  
 Let picture ring behave like boolean control
I have to display status info for 800 tags.  So maybe it would be
easier to convince them to be satticefied with selecting the state
from the ring.

All these controls are directly linked to DS on the front panel, since
half of it should be able to write as well. But, as already mentioned,
the bool ctrls doesn't subscribe correctly to RSLinx opc. Using other
opc servers I have no problem.

Thanx for your help.



Fri, 20 May 2005 22:53:06 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Make the text control behave like the entry control

2. Let's force synthesizers to behave

3. Programmatically loading a Picture Ring

4. Pict Ring, picture is damaged on display

5. rotate a BMP without using a picture ring?

6. ring control and case structure

7. Retrieve the selected text from an ENUM, text ring or other control

8. Need help with menu ring or listbox control.

9. Menu ring control updating failure

10. Help with Ring and Enum Controls...

11. Ring and enumeration controls increment backwards in LabVIEW 7

12. Using Ring to Control Case

 

 
Powered by phpBB® Forum Software