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
  [Tkinter] TKinter Remove Button Frame Nu2Python 8 818 Jan-16-2024, 06:44 PM
Last Post: rob101
  [PyQt] Hover over highlighted text and open popup window DrakeSoft 2 1,448 Oct-29-2022, 04:30 PM
Last Post: DrakeSoft
  Figure Gets Larger Every time I click a show button joshuagreineder 2 1,271 Aug-11-2022, 06:25 AM
Last Post: chinky
  [PyQt] How can I sync Combobox index to other combobox index? nickzsche 2 2,332 Jan-03-2022, 12:29 PM
Last Post: Axel_Erfurt
Question [Tkinter] Can I set background color for each item in tkinter Combobox? water 1 5,057 Dec-10-2020, 07:48 PM
Last Post: Larz60+
  Tkinter - How can I remove the background borders from ttk.Button? TurboC 4 16,774 Oct-18-2020, 10:58 AM
Last Post: TurboC
  [tkinter] color change for hovering over button teacher 4 8,329 Jul-04-2020, 06:33 AM
Last Post: teacher
  [Tkinter] combobox and button Agusben 1 2,197 Apr-29-2020, 01:40 PM
Last Post: Larz60+
  POPUP on widget Entry taratata2020 4 3,673 Mar-10-2020, 05:04 PM
Last Post: taratata2020
  [PySimpleGui] How to alter mouse click button of a standard submit button? skyerosebud 3 4,949 Jul-21-2019, 06:02 PM
Last Post: FullOfHelp

Forum Jump:

User Panel Messages

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