TcxComboBoxProperties下拉框填充

原文地址:https://www1.devexpress.com/Support/Center/Question/Details/CQ30369

Actually, the corresponding editor is passed to this event handler via the Sender parameter. So, please cast the Sender parameter to the corresponding type (to the TcxComboBox in this particular case) and then use its Properties.Items property to populate the editor's dropdown list:

procedure TForm1.cxVerticalGrid1EditorRow1EditPropertiesInitPopup(
  Sender: TObject);
var
  I: Integer;
begin
  with TcxComboBox(Sender).Properties do
  begin
    BeginUpdate;
    try
      Items.Clear;
      for I := 0 to 100 do
        Items.Add('Item#' + IntToStr(I));
    finally
      EndUpdate;
    end;
  end;
end;

猜你喜欢

转载自www.cnblogs.com/railgunman/p/10982542.html