-
Notifications
You must be signed in to change notification settings - Fork 0
/
Form1.vb
34 lines (30 loc) · 1.37 KB
/
Form1.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
Imports System
Imports System.Collections.Generic
Imports System.ComponentModel
Imports System.Data
Imports System.Drawing
Imports System.Linq
Imports System.Text
Imports System.Windows.Forms
Imports DevExpress.Utils.Win
Imports DevExpress.XtraBars
Imports DevExpress.XtraBars.Controls
Namespace WindowsFormsApplication37
Partial Public Class Form1
Inherits Form
Public Sub New()
InitializeComponent()
AddHandler popupControlContainer1.Popup, AddressOf popupControlContainer1_Popup
End Sub
Private Sub popupControlContainer1_Popup(ByVal sender As Object, ByVal e As EventArgs)
Dim control As PopupControlContainer = TryCast(sender, PopupControlContainer)
Dim barControl As PopupContainerBarControl = (TryCast(control.Parent, PopupContainerBarControl))
AddHandler barControl.Paint, AddressOf Form1_Paint
End Sub
Private Sub Form1_Paint(ByVal sender As Object, ByVal e As PaintEventArgs)
Dim barControl As PopupContainerBarControl = (TryCast(sender, PopupContainerBarControl))
Dim offsetLocation As New Point(barControl.CloseButton.Location.X + barControl.CloseButton.Width + 3, barControl.CloseButton.Location.Y)
e.Graphics.DrawString("Custom string", barControl.Font, Brushes.Green, offsetLocation)
End Sub
End Class
End Namespace