Function EventNumberToolBar() As Integer
Возвращает номер\идентификатор кнопки тулбара
нет
Windows , Linux
#Include "window9.bi"
Dim As Integer hwToolBar
dim as HWND hwnd
#Ifdef __FB_WIN32__
Var iStyle = TBSTYLE_FLAT Or TBSTYLE_TOOLTIPS
#Else
Var iStyle = TBSTYLE_TOOLTIPS
#EndIf
hwnd=OpenWindow("",10,10,185,100)
CenterWindow(hwnd)
hwToolBar=CreateToolBar(,iStyle)
Dim As String sStr(...) = {"Open" , "Cut" , "Copy"}
ToolBarStandardButton(hwToolBar,1,STD_FILEOPEN,sStr(0))
ToolBarStandardButton(hwToolBar,2,STD_CUT, sStr(1))
ToolBarStandardButton(hwToolBar,3,STD_COPY, sStr(2))
ToolBarToolTip(hwnd,1,sStr(0))
ToolBarToolTip(hwnd,2,sStr(1))
ToolBarToolTip(hwnd,3,sStr(2))
Do
Var ev=WaitEvent
If ev=EventClose Then
End
ElseIf ev=EventGadget Then
Select Case EventNumberToolBar
Case 1 To 3
MessBox("","Номер кнопки " & EventNumberToolBar)
End Select
EndIf
Loop
Created with the Personal Edition of HelpNDoc: Easily create EPub books