627afc0c90
[EXAMPLES] * BUG: SystemTray: Update example to follow the new behaviour of X11Systray class.
45 lines
772 B
Text
45 lines
772 B
Text
' Gambas class file
|
|
|
|
'Private $hImage As Image
|
|
|
|
Public Sub _new()
|
|
|
|
'Me.Background = &H007FFF 'Color.SetAlpha(&H007FFF, 192)
|
|
|
|
End
|
|
|
|
Public Sub Form_Open()
|
|
|
|
X11Systray.Show(dwgSystemTray.Handle, dwgSystemTray.Background)
|
|
|
|
End
|
|
|
|
Static Public Sub X11Systray_Arrange()
|
|
|
|
Dim I As Integer
|
|
Dim X, Y, H As Integer
|
|
|
|
Debug X11Systray.Count
|
|
X = 2
|
|
Y = 2
|
|
For I = 0 To X11Systray.Count - 1
|
|
With X11Systray[I]
|
|
Debug I;; .IconW;; .IconH
|
|
If (X + .IconW) >= (Me.ClientW - 2) Then
|
|
X = 2
|
|
Y += H + 2
|
|
H = 0
|
|
Endif
|
|
.Move(X, Y, .IconW, .IconH)
|
|
H = Max(H, .IconH)
|
|
X += .IconW + 2
|
|
End With
|
|
Next
|
|
|
|
End
|
|
|
|
Public Sub dwgSystemTray_Arrange()
|
|
|
|
X11Systray.Move(0, 0, dwgSystemTray.Width, dwgSystemTray.Height)
|
|
|
|
End
|