Changeset 24 for branches/Xvcl/Xvcl.Forms.pas
- Timestamp:
- May 8, 2013, 2:53:22 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/Xvcl/Xvcl.Forms.pas
r23 r24 66 66 with TMessageMouseDown(Message) do begin 67 67 TitleBarBounds := TRectangle.Create(0, 0, Bounds.Width, TitleBarHeight); 68 Focused := True; 68 69 if TitleBarBounds.Contains(ScreenToClient(Position)) then begin 69 Focused := True;70 Result := True;71 70 Move.StartControlPos := Bounds.TopLeft; 72 71 Move.StartMousePos := Position; 73 72 Move.Active := True; 73 Result := True; 74 74 end; 75 75 end else … … 90 90 procedure TForm.Paint; 91 91 begin 92 inherited; 92 93 with Canvas do begin 93 Canvas.Brush.Color := clWhite;94 Canvas.FillRect(TRectangle.Create(0, TitleBarHeight, Size.X, Size.Y));95 94 if Focused then Brush.Color := clLightBlue else 96 95 Brush.Color := clSilver; … … 106 105 (TitleBarHeight - GetTextSize(Caption).Y) div 2), Caption); 107 106 end; 108 inherited;109 107 end; 110 108 111 109 procedure TForm.SetFocused(const Value: Boolean); 112 110 begin 113 FFocused := Value; 114 Paint; 111 if FFocused <> Value then begin 112 FFocused := Value; 113 if Value then TScreen(Screen).FocusForm(Self); 114 end; 115 115 end; 116 116
Note:
See TracChangeset
for help on using the changeset viewer.