From: Peter T. <pe...@us...> - 2004-04-20 09:43:24
|
Update of /cvsroot/jvcl/dev/JVCL3/run In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17579/run Modified Files: JvComCtrls.pas Log Message: - Notify JvTreeView when PageControl disappears Index: JvComCtrls.pas =================================================================== RCS file: /cvsroot/jvcl/dev/JVCL3/run/JvComCtrls.pas,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -d -r1.42 -r1.43 *** JvComCtrls.pas 20 Apr 2004 08:28:53 -0000 1.42 --- JvComCtrls.pas 20 Apr 2004 09:42:58 -0000 1.43 *************** *** 485,488 **** --- 485,489 ---- procedure SetMenu(const Value: TMenu); procedure DoMenuChange(Sender: TObject; Source: TMenuItem; Rebuild: Boolean); + procedure SetPageControl(const Value: TPageControl); protected procedure RebuildFromMenu; virtual; *************** *** 544,548 **** property OnVerticalScroll: TNotifyEvent read FOnVScroll write FOnVScroll; property OnHorizontalScroll: TNotifyEvent read FOnHScroll write FOnHScroll; ! property PageControl: TPageControl read FPageControl write FPageControl; property OnPageChanged: TPageChangedEvent read FOnPage write FOnPage; --- 545,549 ---- property OnVerticalScroll: TNotifyEvent read FOnVScroll write FOnVScroll; property OnHorizontalScroll: TNotifyEvent read FOnHScroll write FOnHScroll; ! property PageControl: TPageControl read FPageControl write SetPageControl; property OnPageChanged: TPageChangedEvent read FOnPage write FOnPage; *************** *** 2458,2463 **** begin inherited Notification(AComponent, Operation); ! if (Operation = opRemove) and (AComponent = FMenu) then ! Menu := nil; end; --- 2459,2469 ---- begin inherited Notification(AComponent, Operation); ! if (Operation = opRemove) then ! begin ! if (AComponent = FMenu) then ! Menu := nil ! else if (AComponent = FPageControl) then ! PageControl := nil; ! end; end; *************** *** 2475,2478 **** --- 2481,2495 ---- end; + procedure TJvTreeView.SetPageControl(const Value: TPageControl); + begin + if FPageControl <> Value then + begin + FPageControl := Value; + if FPageControl <> nil then + FPageControl.FreeNotification(Self); + end; + end; + + // === TJvIPAddressValues ==================================================== *************** *** 2568,2571 **** --- 2585,2589 ---- end; + end. |