Toolbarbutton as toggle

  • Thread starter Thread starter Michel Vanderbeke
  • Start date Start date
M

Michel Vanderbeke

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
 
Michel Vanderbeke said:
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
 
Back
Top