Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我试过了 :
procedure TForm4.Delete1Click(Sender: TObject); begin dbPlanner1.FreeItem(dbPlanner1.Items.Selected); end;
但我最终得到了一个 sql 等待光标。它删除了该项目,但我需要单击其他地方才能摆脱它。在没有该光标的情况下按键盘上的 DEL 删除。我错过了什么?
如果您使用 popupmenu menuitem 执行此操作,则关闭菜单:
procedure TForm4.Delete1Click(Sender: TObject); begin dbPlanner1.FreeItem(dbPlanner1.Items.Selected); ItemPopup.CloseMenu; end;