User Tools

Site Tools


how_to_turn_off_the_tooltips_in_an_application_.htm
Navigation:  How To's and Troubleshooting > How to… >====== How to turn off the tooltips in an application. ====== Previous pageReturn to chapter overviewNext page

NewC7.jpg

The little tips that appear when you “hover” the cursor over a control for a few second are useful additions to a program. Some users prefer to have these options turned off. You can disable tooltips on any of three levels: Application-wide, for a single window, or for an individual control.

To turn tips off:

1.Create a global variable (for the purpose of this example, we'll call it TipFlag). Select the Global button from the Application Tree, then select the Data button. Create the variable as a BYTE. Return to the Global properties Window.

2.Choose your favorite spot and method for prompting the user whether they want the tips or not. If they select no tips, set the global variable flag = 1.

You can set this flag through a toggle on a menu or a checkbox on a window. If desired, you can save the value to your application's INI file and read it back in during program setup (using PUTINI and GETINI).

3.To implement this for an individual control, a single window, or application-wide. Use the following steps:

For an individual control, in the Window Designer:

RIGHT-CLICK on the control.

Select the Embeds choice from the popup menu.

In the “Preparing to process the Window” embed point, insert the following code:

 IF TipFlag = 1

  ?mycontrol{PROP:notips} = 1

 ELSE

  ?mycontrol{PROP:notips} = 0

 END

For a particular window, from the Application Tree:

Highlight the procedure and click the Properties button. Select the

Embeds button on the Procedure Properties dialog. Choose the

“Preparing to process the Window” embed point and insert the following code:

 IF TipFlag = 1

    mywindow{PROP:notips} = 1 ! where mywindow is the label of the WINDOW

 ELSE

   mywindow{PROP:notips} = 0

 END

For an entire application, from the Application Tree:

Press the Global button, the press the Embeds button on the Global Properties dialog. In the “Program Setup” embed point, insert the following code:

!This code must come after the any global code to get

!the users preference for tips or no tips

 IF TipFlag = 1    

   SYSTEM{PROP:notips} = 1

 ELSE

   SYSTEM{PROP:notips} = 0

 END

how_to_turn_off_the_tooltips_in_an_application_.htm.txt · Last modified: 2021/04/15 15:57 by 127.0.0.1