【问题标题】:How to show the popup menu using left click in cxbutton (devexpress Delphi)?如何在 cxbutton (devexpress Delphi) 中使用左键单击显示弹出菜单?
【发布时间】:2015-12-23 10:23:13
【问题描述】:

我有一个附加到 cxbutton(Delphi 的 devexpress 组件)的弹出菜单,鼠标右键单击显示菜单,但现在我需要通过鼠标左键单击它。

请我检查了 cxbutton 的所有属性,但似乎没有人这样做,怎么办?

我正在使用 Delphi 7。

【问题讨论】:

    标签: delphi devexpress delphi-7


    【解决方案1】:

    你试过了吗:

    procedure TForm1.cxButton1Click(Sender: TObject);
    begin
      PopUpMenu1.Popup(Mouse.CursorPos.X, Mouse.CursorPos.Y);
    end;
    

    ?对我来说,这在 D7 中有效,如果右键单击,PopUpMenu 会出现在相同的位置。

    【讨论】:

      【解决方案2】:

      如果你使用Dexpress的弹窗,你可以调用:

      procedure TForm1.cxButton1Click(Sender: TObject);
      begin
         dxBarPopupMenu1.PopupFromCursorPos
      end;
      

      【讨论】:

        猜你喜欢
        • 2014-11-23
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2023-03-27
        • 2018-01-29
        • 1970-01-01
        • 2013-04-04
        相关资源
        最近更新 更多