【发布时间】:2011-08-30 19:28:52
【问题描述】:
我正在尝试从同一个窗口窗体文件的另一个方法中调用单击事件。它对我不起作用。
例如:
theClass = partial class(System.Windows.Forms.Form)
method AlarmListBox_Click(sender: System.Object; e: System.EventArgs);
private
protected
public
method DoSomething;
end;
method theClass.DoSomething;
begin
self.AlarmListBox_Click; <<<this is where i want to call the click event
end;
无论我做什么,它都会不断引发编译器错误。我试过AlarmListBox.Click、AlarmListBox.performClick等。
我遇到的一些错误:
- 没有重载方法“AlarmListBox_Click”为 0 参数。
- 无法访问底层事件字段
那么,如何在同一个窗体窗体中触发事件呢?
【问题讨论】:
标签: events listbox click delphi-prism