diff options
author | graemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2007-09-07 07:52:15 +0000 |
---|---|---|
committer | graemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2007-09-07 07:52:15 +0000 |
commit | 8c4b085a78dccc8f5e5fe429a360ad456175b173 (patch) | |
tree | 4ef4f8b50e382ec81c6bb367a09d470069783283 /src/gui | |
parent | 4296554992d2c56360ef23f5ada4c966b9fa157c (diff) | |
download | fpGUI-8c4b085a78dccc8f5e5fe429a360ad456175b173.tar.xz |
* GUI: Rename the Checkbox property FontName to FontDesc to be consistent with
the rest of the fpGUI controls.
* GUI: Introduced FontDesc and HeaderFontDesc properties in TfpgBaseGrid and
published them in descendant components.
* GUI Designer: All newly placed components now default to the Delphi coding
standards component prefixes.
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/gui_basegrid.pas | 30 | ||||
-rw-r--r-- | src/gui/gui_checkbox.pas | 10 | ||||
-rw-r--r-- | src/gui/gui_grid.pas | 19 |
3 files changed, 49 insertions, 10 deletions
diff --git a/src/gui/gui_basegrid.pas b/src/gui/gui_basegrid.pas index 79dec0ed..5ffaa9ef 100644 --- a/src/gui/gui_basegrid.pas +++ b/src/gui/gui_basegrid.pas @@ -54,7 +54,11 @@ type FTemp: integer; FVScrollBar: TfpgScrollBar; FHScrollBar: TfpgScrollBar; + function GetFontDesc: string; + function GetHeaderFontDesc: string; procedure HScrollBarMove(Sender: TObject; position: integer); + procedure SetFontDesc(const AValue: string); + procedure SetHeaderFontDesc(const AValue: string); procedure SetRowSelect(const AValue: boolean); procedure VScrollBarMove(Sender: TObject; position: integer); procedure SetBackgroundColor(const AValue: TfpgColor); @@ -89,7 +93,9 @@ type property DefaultColWidth: integer read FDefaultColWidth write SetDefaultColWidth default 64; property DefaultRowHeight: integer read FDefaultRowHeight write SetDefaultRowHeight; property Font: TfpgFont read FFont; + property FontDesc: string read GetFontDesc write SetFontDesc; property HeaderFont: TfpgFont read FHeaderFont; + property HeaderFontDesc: string read GetHeaderFontDesc write SetHeaderFontDesc; property BackgroundColor: TfpgColor read FBackgroundColor write SetBackgroundColor; property FocusCol: integer read FFocusCol write SetFocusCol; property FocusRow: integer read FFocusRow write SetFocusRow; @@ -124,6 +130,30 @@ begin end; end; +function TfpgBaseGrid.GetFontDesc: string; +begin + Result := FFont.FontDesc; +end; + +function TfpgBaseGrid.GetHeaderFontDesc: string; +begin + Result := FHeaderFont.FontDesc; +end; + +procedure TfpgBaseGrid.SetFontDesc(const AValue: string); +begin + FFont.Free; + FFont := fpgGetFont(AValue); + RePaint; +end; + +procedure TfpgBaseGrid.SetHeaderFontDesc(const AValue: string); +begin + FHeaderFont.Free; + FHeaderFont := fpgGetFont(AValue); + RePaint; +end; + procedure TfpgBaseGrid.SetRowSelect(const AValue: boolean); begin if FRowSelect = AValue then diff --git a/src/gui/gui_checkbox.pas b/src/gui/gui_checkbox.pas index 7f36dfbb..f9cb6cbe 100644 --- a/src/gui/gui_checkbox.pas +++ b/src/gui/gui_checkbox.pas @@ -22,10 +22,10 @@ type FFont: TfpgFont; FBoxSize: integer; FIsPressed: boolean; - function GetFontName: string; + function GetFontDesc: string; procedure SetBackgroundColor(const AValue: TfpgColor); procedure SetChecked(const AValue: boolean); - procedure SetFontName(const AValue: string); + procedure SetFontDesc(const AValue: string); procedure SetText(const AValue: string); protected procedure HandlePaint; override; @@ -39,7 +39,7 @@ type published property Checked: boolean read FChecked write SetChecked; property Text: string read FText write SetText; - property FontName: string read GetFontName write SetFontName; + property FontDesc: string read GetFontDesc write SetFontDesc; property BackgroundColor: TfpgColor read FBackgroundColor write SetBackgroundColor; property OnChange: TNotifyEvent read FOnChange write FOnChange; end; @@ -68,7 +68,7 @@ begin RePaint; end; -function TfpgCheckBox.GetFontName: string; +function TfpgCheckBox.GetFontDesc: string; begin Result := FFont.FontDesc; end; @@ -81,7 +81,7 @@ begin RePaint; end; -procedure TfpgCheckBox.SetFontName(const AValue: string); +procedure TfpgCheckBox.SetFontDesc(const AValue: string); begin FFont.Free; FFont := fpgGetFont(AValue); diff --git a/src/gui/gui_grid.pas b/src/gui/gui_grid.pas index 9a891681..c57b3c38 100644 --- a/src/gui/gui_grid.pas +++ b/src/gui/gui_grid.pas @@ -20,13 +20,17 @@ uses gui_customgrid; type +{ TfpgGrid = class(TfpgCustomGrid) + public + property Font; + property HeaderFont; published property Columns; property DefaultColWidth; property DefaultRowHeight; - property Font; - property HeaderFont; + property FontDesc; + property HeaderFontDesc; property BackgroundColor; property FocusCol; property FocusRow; @@ -42,7 +46,7 @@ type property OnRowChange; property OnDoubleClick; end; - +} //***************** Move these to CoreLib ******************** TFileEntryType = (etFile, etDir); @@ -109,7 +113,11 @@ type property FixedFont: TfpgFont read FFixedFont; property FileList: TFileList read FFileList; property DefaultRowHeight; + property Font; + property HeaderFont; published + property FontDesc; + property HeaderFontDesc; property RowCount; property ColumnCount; property Columns; @@ -154,13 +162,14 @@ type // property Rows[index: Integer]: TStrings read GetRows write SetRows; end; + TfpgStringGrid = class(TfpgCustomStringGrid) published property Columns; property DefaultColWidth; property DefaultRowHeight; - property Font; - property HeaderFont; + property FontDesc; + property HeaderFontDesc; property BackgroundColor; property FocusCol; property FocusRow; |