silvioprog schrieb:
Hi,

In Windows is very easy:

(...)
var
  VCanvas: TControlCanvas;
begin
  VCanvas := TControlCanvas.Create;
  try
    VCanvas.Control := Edit1;
    VCanvas.TextOut(0, 0, 'Test');
  finally
    VCanvas.Free;
  end;
end;
(...)

But, this code don't works in Linux (Ubuntu 11.04 / GTK2).

It most probably doesn't work on a Mac, where painting is allowed only in during WM_PAINT.

What the alternative to draw text in a TWinControl (GTK2)?

Invalidate the control, and wait for it's OnPaint request.

DoDi


--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to