diff options
author | Jean-Marc Levecque <jean-marc.levecque@jmlesite.fr> | 2011-02-02 09:36:10 +0200 |
---|---|---|
committer | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2011-02-02 09:36:10 +0200 |
commit | 1e649f145f5a0930755b24756081f7399ab2847f (patch) | |
tree | c1b0ba9630f387fbc97693c02bcdddaca2a079df /src | |
parent | 439ca504ee40054088bb97088c0e95c8016f5d5d (diff) | |
download | fpGUI-1e649f145f5a0930755b24756081f7399ab2847f.tar.xz |
Using CreateLabel and a custom font did not resize label component correctly.
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/fpg_label.pas | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gui/fpg_label.pas b/src/gui/fpg_label.pas index 0f9c8b4b..75269246 100644 --- a/src/gui/fpg_label.pas +++ b/src/gui/fpg_label.pas @@ -198,8 +198,11 @@ end; procedure TfpgCustomLabel.ResizeLabel; begin - if FAutoSize and not FWrapText then + if FAutoSize and (not FWrapText) then + begin Width := FFont.TextWidth(FText); + Height:= FFont.Height; + end; UpdateWindowPosition; RePaint; end; |