我想创建一个函数,它应该支持 TListbox 或 TChecklistBox 作为调用参数
MyUISupportFunction ( ...... ; aListBox : TObject);
if (aListBox as TObject) is TListBox then (aListBox as TListbox).Items.Clear;
if (aListBox as TObject) is TCHeckListBox then (aListBox as TCheckListbox).Items.Clear;
我想知道我可以在 UI(TListBox 和 TChechecklist Box)上更高效地编写我的代码