[Gambas-user] Empty ComboBox are filled while scrolling mouse without key press (gb.qt5)

Gianluigi gradobag at gradobag.it
Sun Oct 1 18:30:20 CEST 2023


Il 01/10/23 17:26, Safiur Rahman ha scritto:
> The problem is same with master version also.
>
> This is not a bug. All I want is to disable item selection in combobox 
> with mouse wheel scroll. When I just scroll mouse wheel the combobox 
> are randomly filled.
> Is there any way to disable filling of combobox with scroll of mouse 
> wheel?

Hi,

Private aList As String[] = ["aa", "bb", "cc", "dd", "ee"]
Private aComboBox As New Object[50]

Public Sub Form_Open()

   Dim i As Integer

   For i = 0 To 20
     aComboBox[i] = New ComboBox(Panel1) As "Foo"
   Next
   ShowControls()

End

Private Sub ShowControls()

   Dim i As Integer

   For i = 0 To 20
     With aComboBox[i]
       .X = 0
       .Y = 30 * i
       .Width = 50
       .Height = 25
       .List = aList
     End With
   Next

End

Public Sub Foo_MouseWheel()

   If Mouse.Delta Then Last.text = ""

End

Regards

Gianluigi



More information about the User mailing list