diff options
author | graemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2008-07-21 13:22:32 +0000 |
---|---|---|
committer | graemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2008-07-21 13:22:32 +0000 |
commit | ab28f6dafb053e5a75dd506b9e13a17fd6bd0d31 (patch) | |
tree | b201b132348affdae565defacb635ab3b0064fe8 /src/gui/gui_editcombo.pas | |
parent | 39d4e784a9dc3b3ec948d77295e1178808871041 (diff) | |
download | fpGUI-ab28f6dafb053e5a75dd506b9e13a17fd6bd0d31.tar.xz |
* Applied ComboBox cleanup patch from Luiz Americo
Diffstat (limited to 'src/gui/gui_editcombo.pas')
-rw-r--r-- | src/gui/gui_editcombo.pas | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/src/gui/gui_editcombo.pas b/src/gui/gui_editcombo.pas index 28c0b526..33aff19a 100644 --- a/src/gui/gui_editcombo.pas +++ b/src/gui/gui_editcombo.pas @@ -90,7 +90,6 @@ type function GetText: string; virtual; function HasText: boolean; virtual; procedure SetText(const AValue: string); virtual; - procedure DoUpdateWindowPosition; override; procedure HandleResize(AWidth, AHeight: TfpgCoord); override; procedure HandleKeyChar(var AText: TfpgChar; var shiftstate: TShiftState; var consumed: Boolean); override; procedure HandleKeyPress(var keycode: word; var shiftstate: TShiftState; var consumed: Boolean); override; @@ -349,9 +348,8 @@ begin end; end; FDropDown.Close; - - if HasHandle then - Repaint; + //Repaint will check if Handle is created + Repaint; end; procedure TfpgBaseEditCombo.InternalListBoxKeyPress(Sender: TObject; var keycode: word; @@ -369,8 +367,8 @@ begin end; end; - if HasHandle then - Repaint; + //Repaint will check if Handle is created + Repaint; end; procedure TfpgBaseEditCombo.SetText(const AValue: string); @@ -399,20 +397,10 @@ begin end; end; -procedure TfpgBaseEditCombo.DoUpdateWindowPosition; -begin - //This does not work because is not called before handle create - if FDirty then - CalculateInternalButtonRect; - inherited DoUpdateWindowPosition; -end; - procedure TfpgBaseEditCombo.HandleResize(AWidth, AHeight: TfpgCoord); begin inherited HandleResize(AWidth, AHeight); - //FDirty is false in the first resize interation (before handle creation) - //so the hashandle check - if FDirty or not HasHandle then + if FDirty then CalculateInternalButtonRect; end; |