08-26-2011 02:42 PM
I'm a novice at this. My problem is that I want to make a thermometer
witch consists of a seethrough pane with the thermometerimage gif,
and behind this a red rectangle that can grow to the desired level(themperature)
slowly. (without blocking the view on the height indication stripes on the thermometer)
Can anybody help me please?!
08-26-2011 06:17 PM
I suspect the best way to do this is to use BitmapField and add to this Field an image of a Thermometer that you paint over the top off. Have the 'red bit' transparent as you suggest.
Once you have this working, then you need to override the paint method in this field, You want to use fillRect to paint over a proportion of the Bitmap with red color, and then call super,paint to paint the thermometer (or you could do it yourself using <graphics>drawBitmap(...);
The trick is going to be to figure out how to paint the red rectangle to an appropriate size and that will depend on the thermometer.
So the keys are
b) override paint.