You've already forked lazarus-ccr
tvplanit: Make properties Achors, BorderSpacing and ChildSizing available for TVpResourceCombob and TVpPrintFormatCombobox. Improved, high-dpi aware layout of print preview form.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5076 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -159,6 +159,10 @@ type
|
|||||||
constructor Create (AOwner : TComponent); override;
|
constructor Create (AOwner : TComponent); override;
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
|
|
||||||
|
{$IFDEF LCL}
|
||||||
|
property ChildSizing;
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
published
|
published
|
||||||
property DataStore : TVpCustomDataStore
|
property DataStore : TVpCustomDataStore
|
||||||
read FDataStore write SetDataStore;
|
read FDataStore write SetDataStore;
|
||||||
@ -167,10 +171,14 @@ type
|
|||||||
default ruOnChange;
|
default ruOnChange;
|
||||||
property Version : string
|
property Version : string
|
||||||
read GetAbout write SetAbout stored False;
|
read GetAbout write SetAbout stored False;
|
||||||
|
|
||||||
|
property Align;
|
||||||
property Anchors;
|
property Anchors;
|
||||||
property Constraints;
|
property Constraints;
|
||||||
property Style;
|
property Style;
|
||||||
|
{$IFDEF LCL}
|
||||||
|
property Borderspacing;
|
||||||
|
{$ENDIF}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
@ -67,11 +67,19 @@ type
|
|||||||
procedure UpdateItems;
|
procedure UpdateItems;
|
||||||
|
|
||||||
property Style;
|
property Style;
|
||||||
|
{$IFDEF LCL}
|
||||||
|
property ChildSizing;
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
published
|
published
|
||||||
property Version: string read GetAbout write SetAbout stored False;
|
property Version: string read GetAbout write SetAbout stored False;
|
||||||
property ControlLink: TVpControlLink read FControlLink write SetControlLink;
|
property ControlLink: TVpControlLink read FControlLink write SetControlLink;
|
||||||
|
|
||||||
|
property Align;
|
||||||
|
property Anchors;
|
||||||
|
{$IFDEF LCL}
|
||||||
|
property Borderspacing;
|
||||||
|
{$ENDIF}
|
||||||
property Cursor;
|
property Cursor;
|
||||||
property DragCursor;
|
property DragCursor;
|
||||||
property DragMode;
|
property DragMode;
|
||||||
|
@ -17,42 +17,14 @@ object frmPrintPreview: TfrmPrintPreview
|
|||||||
LCLVersion = '1.7'
|
LCLVersion = '1.7'
|
||||||
object Panel1: TPanel
|
object Panel1: TPanel
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 62
|
Height = 58
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 540
|
Width = 540
|
||||||
Align = alTop
|
Align = alTop
|
||||||
ClientHeight = 62
|
AutoSize = True
|
||||||
|
ClientHeight = 58
|
||||||
ClientWidth = 540
|
ClientWidth = 540
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
object cboxZoom: TComboBox
|
|
||||||
Left = 296
|
|
||||||
Height = 23
|
|
||||||
Top = 32
|
|
||||||
Width = 145
|
|
||||||
ItemHeight = 15
|
|
||||||
Items.Strings = (
|
|
||||||
'Fit to Control'
|
|
||||||
'Actual Size'
|
|
||||||
'25%'
|
|
||||||
'33%'
|
|
||||||
'50%'
|
|
||||||
'67%'
|
|
||||||
'75%'
|
|
||||||
)
|
|
||||||
OnChange = cboxZoomChange
|
|
||||||
Style = csDropDownList
|
|
||||||
TabOrder = 2
|
|
||||||
end
|
|
||||||
object VpPrintFormatComboBox1: TVpPrintFormatComboBox
|
|
||||||
Left = 8
|
|
||||||
Height = 23
|
|
||||||
Top = 32
|
|
||||||
Width = 280
|
|
||||||
ItemHeight = 15
|
|
||||||
Sorted = True
|
|
||||||
TabOrder = 1
|
|
||||||
OnChange = VpPrintFormatComboBox1Change
|
|
||||||
end
|
|
||||||
object ToolBar1: TToolBar
|
object ToolBar1: TToolBar
|
||||||
Left = 1
|
Left = 1
|
||||||
Height = 27
|
Height = 27
|
||||||
@ -122,11 +94,62 @@ object frmPrintPreview: TfrmPrintPreview
|
|||||||
Action = actCancel
|
Action = actCancel
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
object Panel2: TPanel
|
||||||
|
Left = 1
|
||||||
|
Height = 29
|
||||||
|
Top = 28
|
||||||
|
Width = 538
|
||||||
|
Align = alTop
|
||||||
|
AutoSize = True
|
||||||
|
BevelOuter = bvNone
|
||||||
|
ClientHeight = 29
|
||||||
|
ClientWidth = 538
|
||||||
|
TabOrder = 1
|
||||||
|
object cboxZoom: TComboBox
|
||||||
|
Left = 389
|
||||||
|
Height = 23
|
||||||
|
Top = 2
|
||||||
|
Width = 145
|
||||||
|
Align = alRight
|
||||||
|
BorderSpacing.Top = 2
|
||||||
|
BorderSpacing.Right = 4
|
||||||
|
BorderSpacing.Bottom = 4
|
||||||
|
ItemHeight = 15
|
||||||
|
Items.Strings = (
|
||||||
|
'Fit to Control'
|
||||||
|
'Actual Size'
|
||||||
|
'25%'
|
||||||
|
'33%'
|
||||||
|
'50%'
|
||||||
|
'67%'
|
||||||
|
'75%'
|
||||||
|
)
|
||||||
|
OnChange = cboxZoomChange
|
||||||
|
Style = csDropDownList
|
||||||
|
TabOrder = 0
|
||||||
|
end
|
||||||
|
object VpPrintFormatComboBox1: TVpPrintFormatComboBox
|
||||||
|
AnchorSideRight.Control = cboxZoom
|
||||||
|
Left = 4
|
||||||
|
Height = 23
|
||||||
|
Top = 2
|
||||||
|
Width = 381
|
||||||
|
Anchors = [akTop, akLeft, akRight]
|
||||||
|
Borderspacing.Left = 4
|
||||||
|
Borderspacing.Top = 2
|
||||||
|
Borderspacing.Right = 4
|
||||||
|
Borderspacing.Bottom = 2
|
||||||
|
ItemHeight = 15
|
||||||
|
Sorted = True
|
||||||
|
TabOrder = 1
|
||||||
|
OnChange = VpPrintFormatComboBox1Change
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
object VpPrintPreview1: TVpPrintPreview
|
object VpPrintPreview1: TVpPrintPreview
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 756
|
Height = 760
|
||||||
Top = 62
|
Top = 58
|
||||||
Width = 540
|
Width = 540
|
||||||
CurPage = 0
|
CurPage = 0
|
||||||
EndDate = 37355.4526088079
|
EndDate = 37355.4526088079
|
||||||
|
@ -50,9 +50,11 @@ type
|
|||||||
{ TfrmPrintPreview }
|
{ TfrmPrintPreview }
|
||||||
|
|
||||||
TfrmPrintPreview = class(TForm)
|
TfrmPrintPreview = class(TForm)
|
||||||
|
Bevel1: TBevel;
|
||||||
Panel1: TPanel;
|
Panel1: TPanel;
|
||||||
cboxZoom: TComboBox;
|
cboxZoom: TComboBox;
|
||||||
btnCancel: TToolButton;
|
btnCancel: TToolButton;
|
||||||
|
Panel2: TPanel;
|
||||||
VpPrintPreview1: TVpPrintPreview;
|
VpPrintPreview1: TVpPrintPreview;
|
||||||
VpPrintFormatComboBox1: TVpPrintFormatComboBox;
|
VpPrintFormatComboBox1: TVpPrintFormatComboBox;
|
||||||
ToolBar1: TToolBar;
|
ToolBar1: TToolBar;
|
||||||
@ -170,6 +172,7 @@ procedure TfrmPrintPreview.FormCreate(Sender: TObject);
|
|||||||
begin
|
begin
|
||||||
ReturnCode := rtAbandon;
|
ReturnCode := rtAbandon;
|
||||||
SetCaptions;
|
SetCaptions;
|
||||||
|
Toolbar1.ButtonHeight := ScaleY(Toolbar1.ButtonHeight, DesignTimeDPI);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmPrintPreview.SetCaptions;
|
procedure TfrmPrintPreview.SetCaptions;
|
||||||
@ -422,7 +425,7 @@ var
|
|||||||
begin
|
begin
|
||||||
if VpPrintPreview1.ControlLink = nil then
|
if VpPrintPreview1.ControlLink = nil then
|
||||||
exit;
|
exit;
|
||||||
|
(*
|
||||||
cnv := TControlCanvas.Create;
|
cnv := TControlCanvas.Create;
|
||||||
try
|
try
|
||||||
cnv.Control := VpPrintFormatCombobox1;
|
cnv.Control := VpPrintFormatCombobox1;
|
||||||
@ -437,7 +440,7 @@ begin
|
|||||||
|
|
||||||
finally
|
finally
|
||||||
cnv.Free;
|
cnv.Free;
|
||||||
end;
|
end;*)
|
||||||
end;
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
Reference in New Issue
Block a user