Toolbarbutton as toggle

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Michel Vanderbeke

    #1

    Toolbarbutton as toggle

    Hello,

    Is it possible to use a Toolbar Button as a toggle, so that one click shows
    a form and a second click closes it again?

    MAny thanks and greetings,

    Michel

  • Lloyd Sheen

    #2
    Re: Toolbarbutton as toggle


    "Michel Vanderbeke" <michel.vanderb eke@skynet.Bewr ote in message
    news:3844BD51-B59D-4122-BC17-F73302E190A9@mi crosoft.com...
    Hello,
    >
    Is it possible to use a Toolbar Button as a toggle, so that one click
    shows a form and a second click closes it again?
    >
    MAny thanks and greetings,
    >
    Michel
    >
    Sure, the only thing you have to worry about is the initial state of the
    form. Since you most likely only want one occurence of the form you need a
    application wide variable that will hold the instance of the form. Then
    capture the click event and if the form is not shown then show it and the
    reverse if it is already shown.

    Lloyd Sheen

    Comment

    Working...