Custom "Widget" Technique Question

Len Morgan len-morgan at crcom.net
Sat Sep 12 15:31:46 EDT 2009


I'm working on a new project and I'd like some advice on how to create 
custom controls to use on a graphical process display.  This will 
display a water pipeline system with all it's tanks, pipe, valves, 
flow/pressure meters etc.  One of the items I have to display is a water 
tank and I need to display how much water is in it as both a number and 
a graphical representation of the water level.  I've got the gist of the 
drawing managed but I'm going to have to have several of these and I 
don't want to hand create them every time so I'm looking to make a 
"water tank" custom control.

I need to put it somewhere, send it a current level which would update 
the numeric display and set the "water" level.  I'd also like to size 
them so I could have big ones and small ones.

That's a long introduction to my actual question.  I know I can make a 
group of the various parts and script the updating and possibly sizing 
using behavior scripts but once I've created it, where to I put it?  Do 
I create a stack with this group on it and then clone it where I need 
it?  Do I copy and paste (via script)?  I can't add it to the Rev 
graphic object pallet like the datagrid is now.

This is not the only custom control I'm going to need so I'm looking for 
a generic way to handle this kind of thing.  In the end, the program 
will not only have a display of our pipeline but I'd also like to have a 
separate design program to create the system diagrams in case any other 
pipelines want to use the program.

len morgan



More information about the use-livecode mailing list