[Gambas-user] Issue with ColorChooser

Charlie Ogier charlie at cogier.com
Tue Feb 23 18:28:42 CET 2021


Hi,

Am I missing something or is there a problem? I can't get the 
ColorChooser to trigger events for MouseUp, MouseDown, GotFocus & LostFocus.

If you run the code below can you let me know if you also see the issue.

Thanks,

Charlie

*******************************************************

HBox1 As HBox
TextBox1 As TextBox
ColorChooser1 As ColorChooser

Public Sub Form_Open()

   With Me
     .H = 400
     .W = 400
     .Arrangement = Arrange.Vertical
     .Padding = 5
   End With

   With ColorChooser1 = New ColorChooser(Me) As "ColorChooser1"
     .Expand = True
     .Tracking = True
     .Tooltip = "Hello world!"
   End With

   With HBox1 = New HBox(Me)
     .H = 28
     .W = 100
   End With

   With TextBox1 = New TextBox(HBox1) As "TextBox1"
     .H = 28
     .W = 100
     .Expand = True
     .Background = Color.White
     .Text = "Move and click things, should the events not trigger?"
   End With

End

Public Sub TextBox1_GotFocus()

   Me.Text = "TextBox has focus"

End

Public Sub TextBox1_LostFocus()

   Me.Text = "TextBox has lost focus"

End

Public Sub ColorChooser1_MouseDown()

   Stop

End

Public Sub ColorChooser1_MouseUp()

   Stop

End

Public Sub ColorChooser1_GotFocus()

   Stop

End

Public Sub ColorChooser1_LostFocus()

   Stop

End



More information about the User mailing list