[fpc-pascal] TFPColor vs TColor

Graeme Geldenhuys graemeg.lists at gmail.com
Tue May 5 12:14:14 CEST 2009


On Tue, May 5, 2009 at 11:48 AM, Luca Olivetti <luca at ventoso.org> wrote:
>
> I'm not sure, but I think that if it is a visual component, changing its
> color it should invalidate/redraw itself.
> With 4 properties it will be redrawn 4 times instead of just one.

* When loading a stream from *.lfm files, no updates occur until
everything is loaded.

* If setting each R, G, B, A properties individually, then yes you
would get 4 redraws. But if the property supports
BeginUpdate/EndUpdate, then that can be overcomed.

* If modified the TGUIColor class to have a few public properties (the
joys of class types - that's why I like Java code) which gives you
TFPColor and TColor (Delphi/Lazarus style) support. Setting any of
those will only cause a single redraw.

Anyway, fpGUI doesn't use streaming of form files by default. Forms
are defined via normal code (and redraws are limited to only once
while initializing a form). But I want to make sure fpGUI can support
streaming if required in the future or if LCL-fpGUI is developed.

Regards,
  - Graeme -


_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/



More information about the fpc-pascal mailing list