MapInfo Pro Developers User Group

Expand all | Collapse all

Detect double click on toolbutton

  • 1.  Detect double click on toolbutton

    Posted 09-17-2019 06:35
    Hi
    I have a MapBasic 17application with a tool button where the user can plot multiple points, they then manually have to click a second button to activate some more code.
    I would like to enable them to be able to double click on the last point and then automatically fire the next set of code. The number of points plotted may vary.
    We already make use of detecting the shift and Crtl keys, although I could possibly use both together, but wondered if there a MapBasic or Dotnet event handler that can be used to detect a user has double clicked from a tool button, the current CommandInfo doesn't have this.
    Thanks
    David


    ------------------------------
    David Wilson
    Buchanan Computing
    London, UK
    ------------------------------


  • 2.  RE: Detect double click on toolbutton

    Pitney Bowes
    Posted 09-18-2019 06:32
    Edited by Bill Wemple 09-18-2019 06:36
    I believe you're looking for this event handler: IEventsCommon.MapWindowMouseDoubleClick Event.
    Can find an example of its use for MapBasic in the Samples folder of MapBasic Program Directory:
    \MapBasic\ProSpyMB\ProSpyMB_Events.mb

    -Bill

    ------------------------------
    Bill Wemple
    Principal QA Engineer
    Pitney Bowes
    Troy, NY
    ------------------------------



  • 3.  RE: Detect double click on toolbutton

    Posted 09-18-2019 06:51
    Many thanks Bill,
    I will look into it, for now I must admit I've just used the combination of both shift +crtl keys to activate the required MapBasic code after plotting a point.
    David

    ------------------------------
    David Wilson
    Buchanan Computing
    London, UK
    ------------------------------