[Lazarus] How to draw text in a edit (GTK2)

Felipe Monteiro de Carvalho felipemonteiro.carvalho at gmail.com
Tue Oct 4 09:01:05 CEST 2011


On Tue, Oct 4, 2011 at 2:57 AM, silvioprog <silvioprog at gmail.com> wrote:
> What the alternative to draw text in a TWinControl (GTK2)?

I would say that you should never try to draw anything or do any other
attempt to customize a native control. If you do, you are guaranting
that your code will not work in all widgetsets.

The real solution is to not use TEdit for this case, but instead
create a TCDEdit which would be a custom drawn version of TEdit. There
are already many custom drawn controls here:

http://wiki.lazarus.freepascal.org/Lazarus_Custom_Drawn_Controls

But not currently TCDEdit, but patches are welcome.

-- 
Felipe Monteiro de Carvalho




More information about the Lazarus mailing list