Matlab Logo Tool Tips are something that is often overlooked in building a GUI. These handy descriptions can come in quite handy in almost all situations as they provide extra information.

Contents

What is a Tool Tip?

A tool tip is supplementary information about a GUI component that appears when the user hovers the mouse cursor over the GUI component. As you can imagine, this can be quite useful for the user. See below for examples.

  • Tool Tip for the add button:
    Tool Tip 01
  • Tool tip for the first input parameter:
    Tool Tip 02
  • Tool tip for the second input parameter:
    Tool Tip 03

How to Add Tool Tips

Within the GUIDE editor, you can add a tool tip by modifying the “TooltipString” property using the Property Inspector. Simply double click on the component to bring up the Property Inspector. The image below shows that the “TooltipString” property has been modified for the Add! button.

Tool Tip Property

Adding Tool Tips Programmatically

If you would rather add the tool tips within your code, you can use the SET command. For instance, if you wanted to add a tool tip for the add button, you could do the following in the opening function of the GUI:

%put this code into the opening function of the GUI
 
set(handles.input1_editText,'TooltipString','This is the first input.')
set(handles.input2_editText,'TooltipString','This is the second input.')
set(handles.add_pushbutton,'TooltipString','This is a tool tip! Press to add.')

If you have a large list of tooltips, you may want to do it in separate m-file and call that m-file in the opening function.

Download the Source Files and Other Links

Download the source files here.
Yair’s Undocumented Tips on How to Spice up Tooltips