[Lazarus] DestroyHandle not being called at design time

Luiz Americo Pereira Camara luizmed at oi.com.br
Sun Apr 13 16:24:16 CEST 2008


Lee Jenkins wrote:
> Felipe Monteiro de Carvalho wrote:
>> On Sat, Apr 12, 2008 at 8:18 PM, Lee Jenkins <lee at datatrakpos.com> wrote:
>> I would usually go for either having a fully custom drawn component,
>> where I manage all paint, like here:
>>
>> http://wiki.lazarus.freepascal.org/Developing_with_Graphics#Create_a_custom_control_which_draws_itself
> 
> Won't I still run into the DrawText problem whether I am having whether I am 
> trying to draw on a TImage or the canvas of a descendant of TCustomControl?
> 

Nope, TCustomControl provides a canvas for you to draw everything your way and
your style. TImage is a widgetset specific GTKImage or QtImage or Carbon Image or
Win32 Image control (contained in comctrls.dll) component that renders itself
according to the rules of the widgetset it belongs to. So some widgetset's TImage
doesn't have some capabilities that some other widgetset's TImage have. In these
cases its better to draw it yourself with a TCustomControl.

I do many exotic and non-conventional controls by descending from TCustomControl
since Delphi2 days. It obeys you 100% and not the widgetset it binds with.
Its the same concept of fpGUI widgets.


HTH,
Funky Beast



More information about the Lazarus mailing list