AnsweredAssumed Answered

Vrf - Toggle Control Icons

Question asked by VRFuser on Apr 23, 1997
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 control
>object.  This can be done with a picture object by adding a data input pin.

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)" or
"Data-Toggle Control-Button". In this way the indicator could shows
different colours due to different events and depending on them the operator
could push the button performing some action/s. Moreover, I suggested that
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 function
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 with
a lot of colours.
3. Create a button which perform the required action. The button is added to
the UF panel in the same place than the picture.
4. The main program need previously to make a "Device-Function-ShowPanel" in
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 removed.

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

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

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). The
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 you
cannot control which is the root directory but I think you could be able to
control the subdirectories in a lower level from the root.

Let me know if this functions. Bye,
______________________________________________________

Juan Carlos Martin
E-mail     : jcmar@mdr.indra-espacio.es
Phone      : 34-1-3963995
Fax     : 34-1-3963912
Earth Stations Department
INDRA ESPACIO / MADRID /SPAIN


Outcomes