summaryrefslogtreecommitdiff
path: root/extras
diff options
context:
space:
mode:
authorgraemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf>2007-10-02 14:15:35 +0000
committergraemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf>2007-10-02 14:15:35 +0000
commit433fbe8a1810882eda822e4cf4ccdefdbd8de959 (patch)
tree1ef626b77eb8e9559e4cb090681439d459cd7f76 /extras
parent227c28d9f7f7b3d30dc2df2bc3a4a935e4c4ba64 (diff)
downloadfpGUI-433fbe8a1810882eda822e4cf4ccdefdbd8de959.tar.xz
* Fixed the Generic Edit Mediator unit for the Dynamic ComboBox.
The FocusItem property is 1-based and not 0-based like it was implemented. This is where fpGUI is different from LCL or VCL. * Created a MaxLength property for TfpgMemo * Added a comment in gui_combobox so developers know the component is 1-based. Soon the documentation will also mention this.
Diffstat (limited to 'extras')
-rw-r--r--extras/tiopf/gui/tiGenericEditMediators.pas6
1 files changed, 3 insertions, 3 deletions
diff --git a/extras/tiopf/gui/tiGenericEditMediators.pas b/extras/tiopf/gui/tiGenericEditMediators.pas
index b5a9159f..ea483612 100644
--- a/extras/tiopf/gui/tiGenericEditMediators.pas
+++ b/extras/tiopf/gui/tiGenericEditMediators.pas
@@ -828,10 +828,10 @@ var
begin
if not DataAndPropertyValid then
Exit; //==>
- if EditControl.FocusItem < 0 then
+ if EditControl.FocusItem < 1 then
Exit; //==>
- lValue := TtiObject(FList.Items[EditControl.FocusItem]);
+ lValue := TtiObject(FList.Items[EditControl.FocusItem-1]);
lPropType := typinfo.PropType(Subject, FieldName);
if lPropType = tkClass then
@@ -865,7 +865,7 @@ begin
for i := 0 to FList.Count - 1 do
if FList.Items[i] = lValue then
begin
- EditControl.FocusItem := i;
+ EditControl.FocusItem := i+1; // Control is 1-based
Break; //==>
end;