原文地址: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;
本文详细介绍了如何使用DevExpress组件库中的TcxComboBox控件,并通过事件处理器动态填充其下拉列表。具体操作涉及将事件处理器与控件关联,利用Sender参数获取控件实例,调用BeginUpdate和EndUpdate方法优化性能,以及使用Items.Add方法添加项目。
1072

被折叠的 条评论
为什么被折叠?



