[Migrated content. Thread originally posted on 20 April 2004]
A push button on a tool bar is returning a different event-type than a push button off the tool bar.
I've created a tool bar and drawn a push button on it. In the event-tab of the property window I keyed in a procedure name for cmd-clicked and then edited the procedure in the event editor.
Did the same for a push button not on the tool bar.
When the button on the tool bar is clicked it returns the cmd-goto event-type. When the button off the tool bar is clicked it returns the cmd-clicked event type.
Has anyone else encountered this also.
6.1 and Windows XP
hi vinsnash,
you encounter one of the most headache behavior when
programming AcuGT in GUI mode (IMHO).
It's has been a little hard to understand at the beginning, but in
the future, you'll remember it by sure.
What you have to do is define the style SELF-ACT in the
push-button of the toolbar.
You receive the cmd-goto message, because actually you're accepting another screen (probably the main form screen), while
the toolbar displays the toolbar screen.
This message mean you have to terminate the actual accept, and
you have to accept the other screen (the one who generated the
event -- you can find it in the EVENT-STATUS structure), infact the next message you receive is the cmd-clicked.
Setting the SELF-ACT, you won't have the cmd-goto message,
because of the push button is "self activated", and you have just to receive the true event.
Hope this help
Luca