SetToolBarToolTipFont

ToolBar ››
Parent Previous Next

SetToolBarToolTipFont

Синтаксис

sub SetToolBarToolTipFont(ByVal HwndToolBar As integer, ByVal Font As integer)

Описание

Устанавливает шрифт подсказки для кнопок тулбара

Параметры

HwndToolBar - ID тулбара

Font - хендл шрифта, может быть получен с помощью LoadFont , FontRequester

Платформы

Windows

Пример

#Include "window9.bi"
Dim As Integer hwToolBar
Dim As String a="open",b="Delete",c="Copy"
#Define TBSTYLE_TOOLTIP 256
var hwnd=OpenWindow("",10,10,406,400)
CenterWindow(hwnd)
hwToolBar=CreateToolBar(,TBSTYLE_FLAT Or TBSTYLE_TOOLTIP)
ToolBarStandardButton(hwToolBar,1,STD_FILEOPEN,a): ToolBarToolTip(hwnd,1,a)
ToolBarSeparator(hwToolBar)
ToolBarStandardButton(hwToolBar,2,STD_DELETE,b): ToolBarToolTip(hwnd,2,b)
ToolBarStandardButton(hwToolBar,3,STD_COPY,c) : ToolBarToolTip(hwnd,3,c)
SetToolBarToolTipFont(hwToolBar,LoadFont("Arial",22,,,1))
Do
  Var ev=WaitEvent
  If ev=EventClose Then
     End
  ElseIf ev=EventGadget Then
     Select Case EventNumberToolBar
        Case 1 To 3
           MessBox("","Button Number  " & EventNumberToolBar)
     End Select
  EndIf
Loop

Результат

Created with the Personal Edition of HelpNDoc: Easily create HTML Help documents