Modifying the application.ToolbarTips property

 

horizontal rule

Back Home Next

Author Aart Onkenhout
Date 28-09-2000

 

When you select 'Show PowerTips' in the toolbar-menu, the value of the application-property ToolbarTips doesn't change. When you want to preserve such a value for a next session, you have to trick a bit. You can do this as foolows:

Declare a user-event on your MDI- or main-window and map it to pbm_command.
Code the following:

Application lapp

/* ib_SetToolTips is an instance variable. This is used because changing the ToolbarTips-property triggers this event again. When ib_SetToolTips = True, I know I'm processing a change of showing the PowerTips.
*/


If ib_SetToolTips Then
    ib_SetToolTips = False
    Return
End If

lapp = GetApplication()

If notificationcode = 113 Then
    ib_SetToolTips = True
    lapp.ToolBarTips = Not lapp.ToolBarTips
End If


ib_SetToolTips must initially be set on TRUE because the event is also triggered when the application is started.