fixed autosizing a disabled label (issue #1382)

git-svn-id: trunk@8046 -
This commit is contained in:
vincents 2005-11-03 15:03:08 +00:00
parent 8721a38171
commit d7f3e8f9a2

View File

@ -42,8 +42,9 @@ begin
if WordWrap then inc(Flags,DT_WordBreak);
DrawText(DC, PChar(Caption), Length(Caption), R, Flags);
SelectObject(DC, OldFont);
AWidth := R.Right - R.Left;
AHeight := R.Bottom - R.Top;
// add one to be able to display disabled label
AWidth := R.Right - R.Left + 1;
AHeight := R.Bottom - R.Top + 1;
finally
ReleaseDC(Parent.Handle, DC);
end;