ToolBarToolTip()

Syntax

ToolBarToolTip(#ToolBar, Button, Text$)
Description
Associates the specified text to the #ToolBar button. A tool-tip text is a text which is displayed when the mouse cursor is over the button for a few time (usually a small yellow floating box).

Parameters

#ToolBar The toolbar to use.
Button The toolbar button to set the tooltip.
Text$ The new text to associate with the toolbar button. If the text is empty, the tooltip is removed.

Return value

None.

Example

  Procedure MenuEvents()
    Debug "ToolBar item selected: " + EventMenu()
  EndProcedure
  
  If OpenWindow(0, 0, 0, 295, 260, "ToolBar example", #PB_Window_SystemMenu | #PB_Window_SizeGadget | #PB_Window_ScreenCentered)
    
    CreateImage(0, 16, 16, 32, #PB_Image_Transparent)
    If StartDrawing(ImageOutput(0))
      Circle(8, 8, 7, RGB(255, 0, 0))
      StopDrawing()
    EndIf
    
    If CreateToolBar(0, WindowID(0))
      ToolBarImageButton(0, ImageID(0))
      ToolBarToolTip(0, 0, "Open")
      ToolBarImageButton(1, ImageID(0))
      ToolBarToolTip(0, 1, "Save")
    EndIf
      
    BindEvent(#PB_Event_Menu, @MenuEvents())
  EndIf

See Also

ToolBarImageButton(), ToolBarSeparator()

Supported OS

All

<- ToolBarSeparator() - ToolBar Index