GetToolBarTextButton

ToolBar ››
Parent Previous Next

GetToolBarTextButton

Синтаксис

Function GetToolBarTextButton(byval HwndToolBar As Integer, ByVal ButtonID As Integer) As String

Описание

Возвращает текст указанной кнопки в тулбаре

Параметры

HwndToolBar - ID тулбара

ButtonID - идентификатор кнопки

Платформы

Windows , Linux

Пример

#Include "window9.bi"
Dim As Integer hwToolBar
var hwnd=OpenWindow("",10,10,406,400)
CenterWindow(hwnd)
#Ifdef __FB_WIN32__
Var style = TBSTYLE_FLAT
#Else
Var style = 0
#EndIf
hwToolBar=CreateToolBar(,style)
ToolBarStandardButton(hwToolBar,1,STD_FILEOPEN,"Open")
ToolBarSeparator(hwToolBar)
ToolBarStandardButton(hwToolBar,2,STD_DELETE,"Delete")
ToolBarStandardButton(hwToolBar,3,STD_COPY,"Copy")
? GetToolBarTextButton(hwToolBar,2)
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

Результат

Delete

Created with the Personal Edition of HelpNDoc: Free help authoring tool