summaryrefslogtreecommitdiff
path: root/prototypes/fpgui2
diff options
context:
space:
mode:
authorgraemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf>2008-01-11 10:25:35 +0000
committergraemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf>2008-01-11 10:25:35 +0000
commit6f51bb7c494a71624e91ca468a67469f97248ff9 (patch)
tree8fbd10c8dc693bae5deb6eddf5153ac3fb6ad69d /prototypes/fpgui2
parentaf360479b99e24dddae75e1a75fa51baeca0db30 (diff)
downloadfpGUI-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')
-rw-r--r--prototypes/fpgui2/tests/edittest.dpr3
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);