win32: don't constraint and autosize csSimple combobox

git-svn-id: trunk@14242 -
This commit is contained in:
paul 2008-02-25 07:42:01 +00:00
parent e43614c705
commit 3d629400eb
2 changed files with 4 additions and 9 deletions

View File

@ -316,7 +316,8 @@ begin
else
if SizeConstraints.Control is TCustomComboBox then
begin
FixedHeight := True; // win32 combo has fixed height
// win32 combo (bug not csSimple) has fixed height
FixedHeight := TCustomComboBox(SizeConstraints.Control).Style <> csSimple;
end;
if (FixedHeight or FixedWidth)

View File

@ -794,15 +794,9 @@ class procedure TWin32WSCustomComboBox.GetPreferredSize(
const AWinControl: TWinControl; var PreferredWidth, PreferredHeight: integer;
WithThemeSpace: Boolean);
begin
if not AWinControl.HandleAllocated then
begin
// any idea about?
PreferredHeight := 0;
end
else
begin
PreferredHeight := 0;
if (AWinControl.HandleAllocated) and (TCustomComboBox(AWinControl).Style <> csSimple) then
PreferredHeight := AWinControl.Height;
end;
end;
class function TWin32WSCustomComboBox.GetSelStart(const ACustomComboBox: TCustomComboBox): integer;