Creates an edit box with a fixed list (list box) underneath. The length of the list is determined by the Height of the combo box
----------------------------------------------
The higher the degree, the greater the respect given to the humblest!RAD 11.3
procedure TForm1.Button2Click(Sender: TObject); var MyItem: TComboExItem; begin ComboBoxEx1.Style := csExDropDown; //csExSimple = ListBox; // for var i := 0 to 6 do begin MyItem := TComboExItem.Create(ComboBoxEx1.ItemsEx); MyItem.Caption := Format('Item%d', [i]); end; // ShowMessage(ComboBoxEx1.ItemsEx.Count.ToString); end;
----------------------------------------------
The higher the degree, the greater the respect given to the humblest!RAD 11.3
procedure TForm1.Button2Click(Sender: TObject); var MyItem: TComboExItem; begin ComboBoxEx1.Style := csExSimple; { csExDropDown; // }// csExSimple = ListBox; // for var i := 0 to 6 do begin MyItem := TComboExItem.Create(ComboBoxEx1.ItemsEx); MyItem.Caption := Format('Item%d', [i]); end; // ComboBoxEx1.Height := 200; // <--- ok! // ShowMessage(ComboBoxEx1.ItemsEx.Count.ToString); end;
----------------------------------------------
The higher the degree, the greater the respect given to the humblest!RAD 11.3
当您复制并粘贴到另一个表单时,ComboBoxEx HEIGHT = 默认大小 = 26
----------------------------------------------
The higher the degree, the greater the respect given to the humblest!RAD 11.3
Well, if you (before) talked about the second monitor, that would be clearer. Problems with Delphi and different monitor resolutions (even more than one monitor) are well known for many reasons. Perhaps you should investigate the settings in "Project -> Options" related to multi-monitor...
Note: I don't have 2 monitors to test.
----------------------------------------------
The higher the degree, the greater the respect given to the humblest!RAD 11.3