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

Safiur Rahman isafiur at gmail.com
Mon Oct 2 05:38:41 CEST 2023


Stop Events works for Panel and other containers but doesn't work with
ComboBox

This works
Public Sub Panel1_MouseWheel()
 If Mouse.Delta Then Stop Event
End

This does not work
Public Sub ComboBox1_MouseWheel()
 If Mouse.Delta Then Stop Event
End

Also setting the ComboBox to ReadOnly while the mouse cursor is over it
makes no difference because you can still change text of ReadOnly ComboBox
with mouse wheel scroll.

On Sun, Oct 1, 2023 at 10:45 PM Safiur Rahman <isafiur at gmail.com> wrote:

> Hi
>
> With this code
> If Mouse.Delta Then Last.Text = ""
> the combobox content is wiped when the mouse scrolls over it.
>
> Is there a way to preserve ComboBox Text which is obtained by selecting an
> item  from pop up list or writing on it but deleting the text which is
> filled just by mouse wheel scroll?
> Is there a way to disable all events due to mouse wheel scroll ?
>
>
> On Sun, Oct 1, 2023 at 10:28 PM Safiur Rahman <isafiur at gmail.com> wrote:
>
>> Hi Gianluigi
>>
>> Thank you very much for your response. It worked perfectly.
>>
>> On Sun, Oct 1, 2023 at 9:11 PM Safiur Rahman <isafiur at gmail.com> wrote:
>>
>>> 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?
>>>
>>> On Sun, Oct 1, 2023 at 8:59 PM Safiur Rahman <isafiur at gmail.com> wrote:
>>>
>>>> Hi Gianluigi
>>>>
>>>> Putting an empty string at the beginning
>>>>
>>>> (Private aList As String[] = ["", "aa", "bb", "cc", "dd", "ee"]
>>>>
>>>> didn't work. I have not tested with master version yet
>>>>
>>>>
>>>> On Sun, Oct 1, 2023 at 7:53 PM Safiur Rahman <isafiur at gmail.com> wrote:
>>>>
>>>>> Hi
>>>>>
>>>>> On scrolling  the empty comboBox (ReadOnly = False ) are filled with
>>>>> texts without any key press. How can I control this? Please provide me a
>>>>> workaround to control this problem.
>>>>> Using gb.qt5 in Ubuntu 22.04 using gambas stable PPA
>>>>>
>>>>> Please check this video
>>>>> http://safiur.com.np/gambas/combobox.webm
>>>>>
>>>>> Attached a project.
>>>>>
>>>>> --
>>>>> Regards
>>>>> Safiur Rahman
>>>>>
>>>>
>>>>
>>>> --
>>>> Regards
>>>> Safiur Rahman
>>>>
>>>
>>>
>>> --
>>> Regards
>>> Safiur Rahman
>>>
>>
>>
>> --
>> Regards
>> Safiur Rahman
>>
>
>
> --
> Regards
> Safiur Rahman
>


-- 
Regards
Safiur Rahman
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20231002/ad8493dc/attachment-0001.htm>


More information about the User mailing list