diff options
author | graemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2008-07-07 22:52:27 +0000 |
---|---|---|
committer | graemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2008-07-07 22:52:27 +0000 |
commit | 77f68d38a6dc24ec0679f7fd23bf42869e795313 (patch) | |
tree | 875e8d65bddd8470aff8026e634738804d59df84 /examples/gui/edits | |
parent | 0fed18d37c6348ec91790f7e3fab843b2efaceda (diff) | |
download | fpGUI-77f68d38a6dc24ec0679f7fd23bf42869e795313.tar.xz |
* Published more events and properties for EditInteger and EditFload components.
* Now the Min/Max Size is actually applied, the Message Dialogs needed minor attention.
* Updated all the example projects to use the newer all-in-one fpgui_toolkit lazarus package.
* Did some minor bug fixing in some of the examples. 1-based indexing instead of 0-based indexing etc.
Diffstat (limited to 'examples/gui/edits')
-rw-r--r-- | examples/gui/edits/edittest.lpi | 2 | ||||
-rw-r--r-- | examples/gui/edits/edittest.lpr | 30 |
2 files changed, 25 insertions, 7 deletions
diff --git a/examples/gui/edits/edittest.lpi b/examples/gui/edits/edittest.lpi index e9661391..ee87a9f5 100644 --- a/examples/gui/edits/edittest.lpi +++ b/examples/gui/edits/edittest.lpi @@ -29,7 +29,7 @@ </RunParams> <RequiredPackages Count="1"> <Item1> - <PackageName Value="fpgui_package"/> + <PackageName Value="fpgui_toolkit"/> </Item1> </RequiredPackages> <Units Count="1"> diff --git a/examples/gui/edits/edittest.lpr b/examples/gui/edits/edittest.lpr index 6dfe0b63..c7c133f2 100644 --- a/examples/gui/edits/edittest.lpr +++ b/examples/gui/edits/edittest.lpr @@ -7,7 +7,7 @@ uses cthreads, {$ENDIF}{$ENDIF} Classes, fpgfx, gui_form, gui_label, gui_edit, gui_button, gui_radiobutton, - gui_listbox, gfxbase; + gui_listbox, gfxbase, gui_checkbox; type @@ -18,10 +18,12 @@ type procedure btnQuitClicked(Sender: TObject); procedure rbClicked(Sender: TObject); procedure lbChange(Sender: TObject); + procedure chbPasswdChanged(Sender: TObject); public {@VFD_HEAD_BEGIN: MainForm} lblName1: TfpgLabel; edtText: TfpgEdit; + chbPasswd: TfpgCheckBox; lblName2: TfpgLabel; lblName3: TfpgLabel; edtInteger: TfpgEditInteger; @@ -60,6 +62,11 @@ begin edtInteger.NegativeColor := lbNegativeColor.Color; end; +procedure TMainForm.chbPasswdChanged(Sender: TObject); +begin + edtText.PasswordMode := chbPasswd.Checked; +end; + procedure TMainForm.AfterCreate; begin {@VFD_BODY_BEGIN: MainForm} @@ -83,15 +90,26 @@ begin Name := 'edtText'; SetPosition(24, 28, 120, 22); TabOrder := 1; - Text := ''; + Text := 'Hello World!'; FontDesc := '#Edit1'; end; + chbPasswd := TfpgCheckBox.Create(self); + with chbPasswd do + begin + Name := 'chbPasswd'; + SetPosition(24, 55, 152, 20); + FontDesc := '#Label1'; + TabOrder := 2; + Text := 'Password Mode'; + OnChange :=@chbPasswdChanged; + end; + lblName2 := TfpgLabel.Create(self); with lblName2 do begin Name := 'lblName2'; - SetPosition(8, 68, 80, 16); + SetPosition(8, 88, 80, 16); FontDesc := '#Label1'; Text := 'Integer Edit'; end; @@ -100,7 +118,7 @@ begin with lblName3 do begin Name := 'lblName3'; - SetPosition(8, 124, 80, 16); + SetPosition(8, 144, 80, 16); FontDesc := '#Label1'; Text := 'Float Edit'; end; @@ -109,14 +127,14 @@ begin with edtInteger do begin Name := 'edtInteger'; - SetPosition(24, 88, 120, 22); + SetPosition(24, 108, 120, 22); end; edtFloat := TfpgEditFloat.Create(self); with edtFloat do begin Name := 'edtFloat'; - SetPosition(24, 144, 120, 22); + SetPosition(24, 164, 120, 22); end; btnQuit := TfpgButton.Create(self); |