diff options
author | graemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2008-05-22 10:08:28 +0000 |
---|---|---|
committer | graemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2008-05-22 10:08:28 +0000 |
commit | caddcbd0b867032e9d8be9c40a8be237f7c6af17 (patch) | |
tree | 0b629b487b8ce82cd6db38afb8be85a123b2e85c /src/gui | |
parent | fcabfcf34654906367bbedb75dbb885934db4d16 (diff) | |
download | fpGUI-caddcbd0b867032e9d8be9c40a8be237f7c6af17.tar.xz |
* New OnResize event for TfpgWidget.
* Minor bugfix in CreateEdit and width = 0.
* Font is now a public property of TfpgEdit
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/gui_edit.pas | 9 | ||||
-rw-r--r-- | src/gui/gui_form.pas | 2 |
2 files changed, 5 insertions, 6 deletions
diff --git a/src/gui/gui_edit.pas b/src/gui/gui_edit.pas index ccfe5418..278442ad 100644 --- a/src/gui/gui_edit.pas +++ b/src/gui/gui_edit.pas @@ -33,8 +33,6 @@ type TfpgEditBorderStyle = (bsNone, bsDefault, bsSingle); - { TfpgCustomEdit } - TfpgCustomEdit = class(TfpgWidget) private FAutoSelect: Boolean; @@ -115,6 +113,7 @@ type TfpgEdit = class(TfpgCustomEdit) public + property Font; property PopupMenu; // UI Designer doesn't fully support it yet published property AutoSelect; @@ -137,8 +136,6 @@ type end; - { TfpgBaseNumericEdit } - TfpgBaseNumericEdit = class(TfpgCustomEdit) private fOldColor: TfpgColor; @@ -237,7 +234,8 @@ begin Result := TfpgEdit.Create(AOwner); Result.Left := x; Result.Top := y; - Result.Width := w; + if w > 0 then + Result.Width := w; if h < TfpgEdit(Result).FFont.Height + 6 then Result.Height:= TfpgEdit(Result).FFont.Height + 6 else @@ -404,7 +402,6 @@ begin Canvas.SetFont(FFont); Canvas.SetTextColor(FTextColor); - // fpgStyle.DrawString(Canvas, -FTextOffset + FSideMargin, 3, dtext, Enabled); fpgStyle.DrawString(Canvas, -FDrawOffset + FSideMargin, 3, FVisibleText, Enabled); if Focused then diff --git a/src/gui/gui_form.pas b/src/gui/gui_form.pas index ea68397b..d4a1ec18 100644 --- a/src/gui/gui_form.pas +++ b/src/gui/gui_form.pas @@ -85,6 +85,7 @@ type property TextColor; property WindowPosition: TWindowPosition read FWindowPosition write FWindowPosition default wpAuto; property WindowTitle: string read FWindowTitle write SetWindowTitle; + // events property OnActivate: TNotifyEvent read FOnActivate write FOnActivate; property OnClose: TFormCloseEvent read FOnClose write FOnClose; property OnCloseQuery: TFormCloseQueryEvent read FOnCloseQuery write FOnCloseQuery; @@ -93,6 +94,7 @@ type property OnDestroy: TNotifyEvent read FOnDestroy write FOnDestroy; property OnHide: TNotifyEvent read FOnHide write FOnHide; property OnPaint; + property OnResize; property OnShow: TNotifyEvent read FOnShow write FOnShow; end; |