Recent

Author Topic: TStatusbar OnDrawPanel not firing  (Read 2794 times)

MISV

  • Hero Member
  • *****
  • Posts: 783
TStatusbar OnDrawPanel not firing
« on: September 26, 2018, 02:24:03 am »
I have SimplePanel := False, Assigned OnDrawPanel and put all my panels Style to psOwnerDraw

But they do not fire... Any way to force them to fire? Maybe on form resize or similar?

(among other things I use the event to update bounds of a progress control)

wp

  • Hero Member
  • *****
  • Posts: 11857
Re: TStatusbar OnDrawPanel not firing
« Reply #1 on: September 26, 2018, 07:33:34 am »
This code is working correctly on Win (10) and Lazarus (gtk2 and qt). Do you call Statusbar.Invalidate?

BTW, in order to show progress of some action in the statusbar, I normally use a TProgressbar and set its parent to the Statusbar. The statusbar is normally hidden and shown only while the observed process runs.


skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Re: TStatusbar OnDrawPanel not firing
« Reply #2 on: September 26, 2018, 08:15:07 am »
this comes from Cocoa WS sources:
Code: Pascal  [Select][+][-]
  1.     //todo: add a method for OwnerDraw Panels support
  2.  
feel free to bug report.

MISV

  • Hero Member
  • *****
  • Posts: 783
Re: TStatusbar OnDrawPanel not firing
« Reply #3 on: September 26, 2018, 10:29:12 am »
Submitted bug report

@WP used your demo project (did not paint on Cocoa)

 

TinyPortal © 2005-2018