csDropDownList style cause DropDownCount to be ignored
Original Reporter info from Mantis: mgr.inz.Player
-
Reporter name:
Original Reporter info from Mantis: mgr.inz.Player
- Reporter name:
Description:
1 add combobox and button to the form
2 on form create or show add this code (DropDownCount set to 10):
ComboBox1.Style:=csDropDownList;
ComboBox1.Items.Clear;
for i:=1 to 10 do ComboBox1.Items.Add(inttostr(i));
ComboBox1.DropDownCount:=10;
3 button on click event (DropDownCount set to 15):
procedure TForm1.Button1Click(Sender: TObject);
var
i: integer;
begin
ComboBox1.Items.Clear;
for i:=1 to 15 do ComboBox1.Items.Add(inttostr(i));
ComboBox1.DropDownCount:=15;
end;
4 launch application, click combobox. You will see that combobox drop down list will show "8 items and scroll bars" instead of "10 items without scroll bars"
5 click button, then combobox. Drop down list will show "8 items and scroll bars" instead of "15 items without scroll bars"
Issue exists in Lazarus 2.0.10 and Lazarus freshly compiled from trunk branch (revision 63852).
Additional information:
workaround:
ComboBox1.Style:=csDropDown;
ComboBox1.DropDownCount:=15;
ComboBox1.Style:=csDropDownList;