-
Notifications
You must be signed in to change notification settings - Fork 0
/
TabButtonsPanelDescendant.vb
44 lines (35 loc) · 1.44 KB
/
TabButtonsPanelDescendant.vb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
Imports DevExpress.XtraTab.Buttons
Imports DevExpress.XtraTab.ViewInfo
Imports DevExpress.XtraTab
Imports DevExpress.Utils
Imports System.Drawing
Namespace XtraTabWithButtons
Public Class TabButtonsPanelDescendant
Inherits TabButtonsPanel
Private _PageDescendant As XtraTabPageDescendant
Public Sub New(ByVal tabViewInfo As BaseTabControlViewInfo, ByVal pagedes As XtraTabPageDescendant)
MyBase.New(tabViewInfo)
_PageDescendant = pagedes
End Sub
Public ReadOnly Property PageDescendant As XtraTabPageDescendant
Get
Return _PageDescendant
End Get
End Property
Protected Overrides Sub CreateButtonsCore(ByVal buttons As TabButtons, ByVal userButtons As CustomHeaderButtonCollection)
MyBase.CreateButtonsCore(buttons, PageDescendant.CustomButtons)
End Sub
Protected Overrides Sub OnClickButton(ByVal button As TabButtonInfo)
keepButtons += 1
Try
If CanRaiseHeaderButtonClick(button) Then PageDescendant.RaiseCustomPageButtonClick(button)
Finally
keepButtons -= 1
End Try
If Not TabViewInfo.IsDisposing Then TabViewInfo.LayoutChanged()
End Sub
Public Function GetToolTip(ByVal point As Point) As ToolTipControlInfo
Return GetToolTipInfo(point)
End Function
End Class
End Namespace