RE: How do I disable mousewheel scrolling?
Steve Barnes <[email protected]>
| Newsgroups | gmane.comp.python.wxpython |
|---|---|
| Message-ID | <VI1PR03MB447915C53481DA6B0FA968739B980@VI1PR03MB4479.eurprd03.prod.outlook.com> |
Rather than attempting to Disable mouse wheel scrolling you simply add a handler, to the controls that you don’t want to react to the mouse wheel, for EVT_MOUSEWHEEL which just does nothing. Then when those controls have focus nothing happens on mouse wheel events. Hope that helps. Steve Barnes From: [email protected] <[email protected]> On Behalf Of Lawrence Gray Sent: 18 June 2020 18:14 To: [email protected] Subject: [wxPython-users] How do I disable mousewheel scrolling? I have created a simple application part of which incorporates a number (10) of choice elements in a horizontal sizer . These are displayed above a listCtrl and have their width resized to match the widths of the columns in the listCtrl. They effectively form headers for the listCtrl data. The selection in each choice box controls the disposition of the data in that column in subsequent processing. The selection list in all of the choice controls are identical. Some of the selection choices must be unique for the data presented in the listCtrl, ie. no two columns can have identical selections. Some selection choices are allowed multiple times and some selection choices are mutually exclusive. For example, if one column is labelled "Date", which logically should be unique for my purpose, and another column choice selection is set to "Date", the previous column is reset to the default value "--NA--", which means that column data is mow ignored. My problem is that when I make a choice selection in one column and inadvertently or purposely scroll the mouse wheel, the choice selections in other columns are quickly altered as the choice selection list is scrolled, creating havoc. My question is, how do I disable mouse wheel scrolling of the selection list, after making my selection? Is this to the best or only way to get around the problem? What about, after making a selection, altering the focus to the listCtrl, where scrolling of the mouse wheel would not matter? This is my first attempt at creating any GUI application. I am using wxPython in conjunction with wxGlade. Any advice is appreciated. Regards -- ________________________________ Lawrence Gray ________________________________ -- You received this message because you are subscribed to the Google Groups "wxPython-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]<mailto:[email protected]>. To view this discussion on the web visit https://groups.google.com/d/msgid/wxpython-users/CAJFU_KpgTZ-O8Rt5CTex%3DyEH0HA0xh_BO%2B6wpV_tKpscLaFZvg%40mail.gmail.com<https://groups.google.com/d/msgid/wxpython-users/CAJFU_KpgTZ-O8Rt5CTex%3DyEH0HA0xh_BO%2B6wpV_tKpscLaFZvg%40mail.gmail.com?utm_medium=email&utm_source=footer>. -- You received this message because you are subscribed to the Google Groups "wxPython-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/wxpython-users/VI1PR03MB447915C53481DA6B0FA968739B980%40VI1PR03MB4479.eurprd03.prod.outlook.com.