Python Forum
[WxPython] How to show remove button at the right side of the hovering item of a combobox popup?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[WxPython] How to show remove button at the right side of the hovering item of a combobox popup?
#1
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.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
Question [Tkinter] Can I set background color for each item in tkinter Combobox? water 1 181 Dec-10-2020, 07:48 PM
Last Post: Larz60+
  Tkinter - How can I remove the background borders from ttk.Button? TurboC 4 674 Oct-18-2020, 10:58 AM
Last Post: TurboC
  [tkinter] color change for hovering over button teacher 4 1,384 Jul-04-2020, 06:33 AM
Last Post: teacher
  [Tkinter] combobox and button Agusben 1 396 Apr-29-2020, 01:40 PM
Last Post: Larz60+
  POPUP on widget Entry taratata2020 4 1,023 Mar-10-2020, 05:04 PM
Last Post: taratata2020
  [PySimpleGui] How to alter mouse click button of a standard submit button? skyerosebud 3 1,452 Jul-21-2019, 06:02 PM
Last Post: FullOfHelp
  pyqt5 combobox add item with loop shift838 5 5,506 Dec-09-2018, 08:54 PM
Last Post: shift838
  [Tkinter] [SOLVED] Create per button popup menu py2.7 AceScottie 5 3,255 May-31-2018, 12:39 AM
Last Post: AceScottie
  Please advice Linux library - tray icon, popup windows, ICQ/Skype style etc ramendik 5 1,823 Dec-03-2017, 04:35 AM
Last Post: Larz60+
  [Tkinter] Selected radio button in push button in Tkinter prashantfunde91 1 8,561 Jun-22-2017, 05:27 PM
Last Post: DeaD_EyE

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020