You've already forked lazarus-ccr
tvplanit: Define initial control size by GetControlClassDefaultSize. New icons in PrintPreview dialog. Consistent 3D look of TVpPrintPreview.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@8469 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@@ -43,7 +43,7 @@ uses
|
||||
{$ELSE}
|
||||
Windows,
|
||||
{$ENDIF}
|
||||
SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
|
||||
SysUtils, Classes, Graphics, Types, Controls, Forms, Dialogs,
|
||||
VpBase, VpContactGrid, VpMisc;
|
||||
|
||||
const
|
||||
@@ -107,6 +107,7 @@ type
|
||||
procedure SetShowNumberButton(const Value: Boolean);
|
||||
|
||||
{ Overridden methods }
|
||||
class function GetControlClassDefaultSize: TSize; override;
|
||||
procedure Loaded; override;
|
||||
procedure MouseDown(Button: TMouseButton; Shift: TShiftState;
|
||||
X, Y: Integer); override;
|
||||
@@ -200,9 +201,6 @@ constructor TVpContactButtonBar.Create(AOwner: TComponent);
|
||||
begin
|
||||
inherited Create(AOwner);
|
||||
|
||||
Width := 40;
|
||||
Height := 280;
|
||||
|
||||
{$IFDEF VERSION4}
|
||||
DoubleBuffered := True;
|
||||
{$ENDIF}
|
||||
@@ -216,14 +214,16 @@ begin
|
||||
FDrawingStyle := ds3d;
|
||||
FRadioStyle := true;
|
||||
FShowNumberButton := True;
|
||||
|
||||
// Initial size of the control
|
||||
with GetControlClassDefaultSize do
|
||||
SetInitialBounds(0, 0, CX, CY);
|
||||
end;
|
||||
{=====}
|
||||
|
||||
destructor TVpContactButtonBar.Destroy;
|
||||
begin
|
||||
inherited Destroy;
|
||||
end;
|
||||
{=====}
|
||||
|
||||
procedure TVpContactButtonBar.CreateButtons;
|
||||
var
|
||||
@@ -314,7 +314,6 @@ begin
|
||||
FButtonsArray[I + Offset].Caption := ButtonCaption;
|
||||
end;
|
||||
end;
|
||||
{=====}
|
||||
|
||||
procedure TVpContactButtonBar.DrawButton(Index: Integer; Pressed: Boolean);
|
||||
var
|
||||
@@ -374,7 +373,13 @@ begin
|
||||
{DrawTextBiDiModeFlagsReadingOnly or }DT_SINGLELINE or DT_CENTER or DT_VCENTER);
|
||||
end;
|
||||
end;
|
||||
{=====}
|
||||
|
||||
{ Defines the initial size of the control. }
|
||||
class function TVpContactButtonBar.GetControlClassDefaultSize: TSize;
|
||||
begin
|
||||
Result.CX := 40;
|
||||
Result.CY := 300;
|
||||
end;
|
||||
|
||||
procedure TVpContactButtonBar.SelectContact;
|
||||
var
|
||||
|
Reference in New Issue
Block a user