diff options
author | graemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2008-01-11 10:25:35 +0000 |
---|---|---|
committer | graemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2008-01-11 10:25:35 +0000 |
commit | 6f51bb7c494a71624e91ca468a67469f97248ff9 (patch) | |
tree | 8fbd10c8dc693bae5deb6eddf5153ac3fb6ad69d /prototypes/fpgui2/tests | |
parent | af360479b99e24dddae75e1a75fa51baeca0db30 (diff) | |
download | fpGUI-6f51bb7c494a71624e91ca468a67469f97248ff9.tar.xz |
* TfpgWidget now has two new events. OnEnter and OnExit so the user can trap when a component receives or looses keyboard focus.
TfpgEdit has a few new methods. Clear() which clears the Text. ClearSelection() which removes the selected text only. CopyToClipboard(), CutToClipboard() and PasteFromClipboard() is fairly obvious.
TfpgEdit has some new properties. AutoSelect - in enabled (default) will auto select all text when the component receives keyboard focus. HideSelection - by default hides the selection rectangle when the components looses focus. If set to False the selections rectangle will be grayed - not the the user interfaces will look busy if many edit controls keep showing their selections, but now you have a choice.
Diffstat (limited to 'prototypes/fpgui2/tests')
-rw-r--r-- | prototypes/fpgui2/tests/edittest.dpr | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/prototypes/fpgui2/tests/edittest.dpr b/prototypes/fpgui2/tests/edittest.dpr index 29089e93..aa2c5290 100644 --- a/prototypes/fpgui2/tests/edittest.dpr +++ b/prototypes/fpgui2/tests/edittest.dpr @@ -373,9 +373,12 @@ begin w.Left := 140; edit1 := CreateEdit(self, 10, 40, 120, 22); + edit1.AutoSelect := False; + edit1.HideSelection := False; edit1.Text := 'Hello world. Hello world. Hello world.'; edit2 := CreateEdit(self, 10, 70, 200, 22); edit2.Text := 'UTF-8 text -> Òåñò'; + // writeln(UTF8Length(edit2.text)); // writeln(Length(edit2.text)); UTF8Insert('ö', edit2.Text, 15); |