Recent

Author Topic: WMPaint is never called for TEdit  (Read 314 times)

7bit

  • New Member
  • *
  • Posts: 15
WMPaint is never called for TEdit
« on: February 23, 2025, 07:09:09 am »
The TEdit class has a protected WMPaint method that should be called when drawing a component, but this does not happen with QT5/QT6, GTK2 widgets. Why?

IDE: Lazarus 4.0RC2 (rev lazarus_4_0RC2-104-gb0513d9031) FPC 3.2.3 x86_64-linux-gtk2
« Last Edit: February 23, 2025, 08:51:54 pm by 7bit »

zeljko

  • Hero Member
  • *****
  • Posts: 1734
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: WMPaint is never called for TEdit
« Reply #1 on: February 24, 2025, 07:41:21 am »
Because TEdit does not have TCanvas and is not supposed to be painted by user. But if you need paint on then inherit TQtLineEdit  and write paint code in paint event....

 

TinyPortal © 2005-2018