Python Forum

Full Version: How to show remove button at the right side of the hovering item of a combobox popup?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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 Big Grin ]

[combobox with remove button for hovering item]
[Image: kIMtF3G.jpg]

[combobox with remove button for each item]
[Image: iyG23vG.jpg]

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.