summaryrefslogtreecommitdiff
path: root/src/gui/gui_editcombo.pas
diff options
context:
space:
mode:
authorgraemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf>2008-07-21 13:22:32 +0000
committergraemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf>2008-07-21 13:22:32 +0000
commitab28f6dafb053e5a75dd506b9e13a17fd6bd0d31 (patch)
treeb201b132348affdae565defacb635ab3b0064fe8 /src/gui/gui_editcombo.pas
parent39d4e784a9dc3b3ec948d77295e1178808871041 (diff)
downloadfpGUI-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.pas22
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;