From: Remko B. <rem...@pr...> - 2004-01-31 12:51:48
|
Update of /cvsroot/jvcl/dev/JVCL3/run In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18360 Modified Files: JvBalloonHint.pas Log Message: Fix to disable balloon hints at desing-time Index: JvBalloonHint.pas =================================================================== RCS file: /cvsroot/jvcl/dev/JVCL3/run/JvBalloonHint.pas,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** JvBalloonHint.pas 5 Jan 2004 22:37:41 -0000 1.10 --- JvBalloonHint.pas 31 Jan 2004 12:50:07 -0000 1.11 *************** *** 254,258 **** FApplicationHintOptions default [ahShowHeaderInHint, ahShowIconInHint]; property UseBalloonAsApplicationHint: Boolean read GetUseBalloonAsApplicationHint write ! SetUseBalloonAsApplicationHint; property OnBalloonClick: TNotifyEvent read FOnBalloonClick write FOnBalloonClick; --- 254,258 ---- FApplicationHintOptions default [ahShowHeaderInHint, ahShowIconInHint]; property UseBalloonAsApplicationHint: Boolean read GetUseBalloonAsApplicationHint write ! SetUseBalloonAsApplicationHint default False; property OnBalloonClick: TNotifyEvent read FOnBalloonClick write FOnBalloonClick; *************** *** 291,294 **** --- 291,295 ---- FSounds: array [TJvIconKind] of string; FUseBalloonAsApplicationHint: Boolean; + FDesigning: Boolean; function GetMainCtrl: TJvBalloonHint; *************** *** 1343,1346 **** --- 1344,1348 ---- FBkColor := Application.HintColor; + FUseBalloonAsApplicationHint := False; GetDefaultImages; *************** *** 1358,1361 **** --- 1360,1366 ---- begin FCtrls.Add(ABalloonHint); + { Determine whether we are designing } + if Assigned(ABalloonHint) then + FDesigning := csDesigning in ABalloonHint.ComponentState; end; *************** *** 1586,1604 **** procedure TGlobalCtrl.SetUseBalloonAsApplicationHint(const Value: Boolean); begin ! if Value = FUseBalloonAsApplicationHint then ! Exit; ! ! FUseBalloonAsApplicationHint := Value; ! Application.CancelHint; ! if FUseBalloonAsApplicationHint then ! begin ! FOldHintWindowClass := HintWindowClass; ! HintWindowClass := TJvBalloonWindow; ! end ! else ! begin ! HintWindowClass := FOldHintWindowClass; end; end; --- 1591,1611 ---- procedure TGlobalCtrl.SetUseBalloonAsApplicationHint(const Value: Boolean); begin ! if FDesigning then ! FUseBalloonAsApplicationHint := Value ! else if Value <> FUseBalloonAsApplicationHint then ! begin ! FUseBalloonAsApplicationHint := Value; ! Application.CancelHint; ! if FUseBalloonAsApplicationHint then ! begin ! FOldHintWindowClass := HintWindowClass; ! HintWindowClass := TJvBalloonWindow; ! end ! else ! begin ! HintWindowClass := FOldHintWindowClass; ! end; end; end; |