+ Reply to Thread
Results 1 to 3 of 3

CommandBarButton click vs. double click

  1. #1
    Derrick
    Guest

    CommandBarButton click vs. double click

    Hello all;

    I'm using VSTO 2003, and creating a custom CommandBar for Excel. I want to
    be able to distinguish between a single click and a double click of a
    CommandBarButton. However, I noticed the CommandBarButton interface only
    has a "Click" event.

    What I ultimately want to accomplish is equivalent to the Format Painter in
    MS Word: click it once, and it "turns off" after use. Double click it, and
    it stays pressed ("on").

    Any help on how to differentiate between single and double clicks of a
    CommandBarButton?

    Thanks in advance,

    Derrick



  2. #2
    Rob Bovey
    Guest

    Re: CommandBarButton click vs. double click

    "Derrick" <[email protected]> wrote in message
    news:[email protected]...
    > I'm using VSTO 2003, and creating a custom CommandBar for Excel. I want
    > to be able to distinguish between a single click and a double click of a
    > CommandBarButton. However, I noticed the CommandBarButton interface only
    > has a "Click" event.
    >
    > What I ultimately want to accomplish is equivalent to the Format Painter
    > in MS Word: click it once, and it "turns off" after use. Double click
    > it, and it stays pressed ("on").


    Hi Derrick,

    As far as I know, there's no way to do this. The number of things that
    you can create/accomplish using custom command bar controls is only a small
    subset of the number of things you see Excel and the other Office apps doing
    with them.

    --
    Rob Bovey, Excel MVP
    Application Professionals
    http://www.appspro.com/

    * Take your Excel development skills to the next level.
    * Professional Excel Development
    http://www.appspro.com/Books/Books.htm



  3. #3
    Derrick
    Guest

    Re: CommandBarButton click vs. double click

    Thanks Rob. I was afraid of that.

    I managed to "fake it" using a Timer, but it's a bit of a hack. However, in
    doing so, I noticed that if you "double-click" a CommandBarButton, you
    actually receive 3 (yes, that's THREE) Click events. If you
    "quadruple-click", you get 6 events. I guess it is possible that one of
    these indicate a double-click, but there is no way to differentiate - at
    least as far as I can tell...

    Thanks,

    Derrick


    "Rob Bovey" <[email protected]> wrote in message
    news:[email protected]...
    > "Derrick" <[email protected]> wrote in message
    > news:[email protected]...
    >> I'm using VSTO 2003, and creating a custom CommandBar for Excel. I want
    >> to be able to distinguish between a single click and a double click of a
    >> CommandBarButton. However, I noticed the CommandBarButton interface only
    >> has a "Click" event.
    >>
    >> What I ultimately want to accomplish is equivalent to the Format Painter
    >> in MS Word: click it once, and it "turns off" after use. Double click
    >> it, and it stays pressed ("on").

    >
    > Hi Derrick,
    >
    > As far as I know, there's no way to do this. The number of things that
    > you can create/accomplish using custom command bar controls is only a
    > small subset of the number of things you see Excel and the other Office
    > apps doing with them.
    >
    > --
    > Rob Bovey, Excel MVP
    > Application Professionals
    > http://www.appspro.com/
    >
    > * Take your Excel development skills to the next level.
    > * Professional Excel Development
    > http://www.appspro.com/Books/Books.htm
    >
    >




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1