From 433fbe8a1810882eda822e4cf4ccdefdbd8de959 Mon Sep 17 00:00:00 2001 From: graemeg Date: Tue, 2 Oct 2007 14:15:35 +0000 Subject: * 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. --- extras/tiopf/gui/tiGenericEditMediators.pas | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'extras/tiopf') 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; -- cgit v1.2.3-70-g09d2