![]() |
[WxPython] How to show remove button at the right side of the hovering item of a combobox popup? - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: GUI (https://python-forum.io/forum-10.html) +--- Thread: [WxPython] How to show remove button at the right side of the hovering item of a combobox popup? (/thread-17095.html) |
How to show remove button at the right side of the hovering item of a combobox popup? - indrajitmajumdar - Mar-28-2019 Hi there, What I want is a means/way to remove an item from the wxpython combobox without having to add a separate remove button somewhere else in the gui. So I want a "remove button" to appear at the right side on the combobox dropdown item when I hover over my mouse pointer on it. It is also OK if all the items have remove button at the right side and do not need hovering. I want that "remove button" when clicked to trigger a callback function. [NOTE: Using latest cPython 3.x with latest wxpython installed with pip on Windows 7 32 bit Service Pack 1] The images bellow will illustrate what I am saying [...please ignore my mspaint skils ![]() [combobox with remove button for hovering item] ![]() [combobox with remove button for each item] ![]() I am doing something like this inside my class definition for the combobox: [Its fairly standard I guess.] self.cbx1 = wx.ComboBox(self, choices=self.LC_Data["opt"], size=(300, -1), style=wx.CB_DROPDOWN|wx.TE_PROCESS_ENTER) Can anybody help please. [I am new to python and wxpython. So please ignore my ignorance if any. And for the same reason any simple code sample will be greatly helpful.] Regards. |