Quantcast
Channel: Planet Object Pascal
Viewing all articles
Browse latest Browse all 1725

The Wiert Corner - irregular stream of stuff: jpluimers

$
0
0

Interesting, as I didn’t think this was possible. Thanks Oliver Funcke!

Notification when a `TFrame` becomes visible.

TMyCommonFrame = class(TFrame)
  private
    FOnShow: TNotifyEvent;
    procedure CMShowingChanged(var M: TMessage); message CM_SHOWINGCHANGED;
  public
    property OnShow : TNotifyEvent read FOnShow write FOnShow;
  end;
...
procedure TMyCommonFrame.CMShowingChanged(var M: TMessage);
begin
  inherited;
  if Showing and Assigned(FOnShow) then
    FOnShow(Self);
end;

–jeroen

via Is there any way for a VCL TFrame to be notified when it is actually shown to….


Filed under: Delphi, Delphi 2007, Delphi 2009, Delphi 2010, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Delphi XE6, Development, Software Development

Viewing all articles
Browse latest Browse all 1725

Trending Articles