AnsweredAssumed Answered

Toggle Control Icons

Question asked by VRFuser on Apr 23, 1997
We did something similar, here is a UF for
one of our user interface functions along with
the image files needed.
Note: It worked best for us to the image files
in a subdirectory under the vee bitmaps directory; it
helped us achieve platform independence for the UF.
These are expected to be found in vee's bitmaps/AB/ directory.

[[ TOGGLE.VEE : 3132 in TOGGLE.VEE ]]
[[ YES2.BMP : 3133 in YES2.BMP ]][[ NO2.BMP : 3134 in NO2.BMP ]][[  

Rob Marquardt
System Test Engineering
Rockwell Automation / Allen-Bradley
Milwaukee, Wisconsin, USA

From:  Juan Carlos Martin
Sent:  Thursday, April 24, 1997 4:53 AM
To:  Steven M. Timian
Cc:  hpvxd_xc
Subject:  Re: Vrf - Toggle Control Icons

At 12:47 22/04/97 -0400, you wrote:
>I have a number of toggle objects with unique icons.  Does anyone know  
of a
>way to programatically set the on and off icon files for a toggle  
>object.  This can be done with a picture object by adding a data input  

Hi Steve,

Time ago I suggested (in this medium) the possibility to have an object
mixed between "Display-Indicator-Color Alarm" and a "Flow-Confirm (OK)"  
"Data-Toggle Control-Button". In this way the indicator could shows
different colours due to different events and depending on them the  
could push the button performing some action/s. Moreover, I suggested  
the indicator could have more than 3 colours that could be added as
"else/if" in a "Flow-if/then/else" object.

That is very useful for Monitoring&Control applications.

Currently, in order to perform this we use a workaround as follows:
1. Perform the bitmaps in different colours with the same name and with
0,1,2... extensions.
2. Create a UserFuntion which have a input that is the colour. This  
has a "Picture" object which is feed by the name of the bitmap file. The
name of the file is obtained from the name with the extension through the
input UF data.
This picture is added to the UF panel. In this way we have a indicator  
a lot of colours.
3. Create a button which perform the required action. The button is added  
the UF panel in the same place than the picture.
4. The main program need previously to make a "Device-Function-ShowPanel"  
the place where we want and with the size we want.
5. The UF panel has to be locked and Show Panel on Execute property  

May be in some complicated but the effect is very good.

>My problem comes when the run time program is installed in a directory  
>than the exact directory which contained the icons during development.
>Any help will be greatly appreciated.

Suggestion: put all the environment variables (directories in which files
are read or written, for example) as global variables in a tree way.
That is, you have a global variable name that could be G_path_root and it
defines the root directory (that in V4.0 can be obtained from a object).  
rest of directories could be defined as

Formula -> G_bitmaps = G_path_root+" itmaps"

where  itmaps is the subdirectory where you have the bitmaps. Probably  
cannot control which is the root directory but I think you could be able  
control the subdirectories in a lower level from the root.

Let me know if this functions. Bye,

Juan Carlos Martin
E-mail :
Phone  : 34-1-3963995
Fax : 34-1-3963912
Earth Stations Department