summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGraeme Geldenhuys <graeme@mastermaths.co.za>2011-02-07 16:45:15 +0200
committerGraeme Geldenhuys <graeme@mastermaths.co.za>2011-02-07 16:45:15 +0200
commit13073ffeaf198bc1244218088878b0eebcae6510 (patch)
tree0aa387f1df039215da9b7098b89ed1bb1fb5c826 /src
parent99c87628f70d4f5bc9a4fe2e939c2d150e2abdb5 (diff)
downloadfpGUI-13073ffeaf198bc1244218088878b0eebcae6510.tar.xz
Combobox fix: Setting the Martin cause the Height to change.
Now the Height will only change if AutoSize is actually enabled.
Diffstat (limited to 'src')
-rw-r--r--src/gui/fpg_combobox.pas7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gui/fpg_combobox.pas b/src/gui/fpg_combobox.pas
index b27d3fc2..1153e94c 100644
--- a/src/gui/fpg_combobox.pas
+++ b/src/gui/fpg_combobox.pas
@@ -28,6 +28,9 @@ unit fpg_combobox;
{ TODO: Implement .BeginUpdate and .EndUpdate methods so we know when to refresh
the items list. }
+{ TODO: Introduce SideMargin and TopMargin like TfpgEdit, instead of just
+ the single Margin property. }
+
{
This is an example of what we can aim for:
You need a mono font to see the correct layout.
@@ -257,7 +260,9 @@ begin
if (FMargin = AValue) or (AValue <= 0) then
Exit; //=>
FMargin := AValue;
- Height := FFont.Height + (FMargin * 2);
+ if FAutoSize then
+ Height := FFont.Height + (FMargin * 2);
+ Repaint;
end;
procedure TfpgBaseComboBox.SetAutoSize(const AValue: Boolean);