@wp
Getting wiser is the main purpose
Stopped back then when the prise for Delphi 3 from Borland was too high.
And a lot of things have changed (as far as I can remeber).
Thanks for clearing up my "default" mistake.
I changed ancestor to TCustomPanel.
So there are complaints about the bevels - but once cleared, it wors just fine.
I am having some troubles about the paint.
First off, I was using the Color propert of the panel.
It seems to exist in TCustom Panel also, but is not published somehow, and all my attempts to be the one to determine which color is to be used, seem to be ignored. (Compiles just fine, and shows fine in IDE - but not when the testprogram is run...)
Also tried to draw the bevels myself in paint - but it seems to ignore the white color...
Implemented the ComponentState in OnChange - and that also makes a difference. No more calls, until everything is loaded.
(A bit puzzeling - unless the csLoading in ComponentState is not cleared untill all components are loaded...)
(I had tried this, but with checking for csCreating - but that still give the errors).
Thank you for your input!!
@Bart
There are three numbers.
1) GaugeWith, which is the sice of the colored area in pixels.
2) A position, which gives or sets the size of the width in %.
3) A Value, and accompanying max and min values, that are user defined. This can also be read or set programmatically.
So your version may be "better" - but it does not do the same...
I did read your code.
Don't get the point of setting Canvas color when setting the Color property - it is changed in Paint anyway.
But using rect insted af coordinates, makes the code more readabel.
Thank you.