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
  [PyQt] Popup window not coming RamanSMann 2 811 Jan-02-2025, 02:18 AM
Last Post: lyly19
  popup, text input with two readable buttons ethompson 7 1,978 Aug-28-2024, 03:40 AM
Last Post: deanhystad
  [Tkinter] Tkinter popup no grabbing the selected keys - Event propagation Wehaveall 2 1,313 Aug-10-2024, 01:18 PM
Last Post: Wehaveall
  [Tkinter] TKinter Remove Button Frame Nu2Python 8 4,688 Jan-16-2024, 06:44 PM
Last Post: rob101
  [PyQt] Hover over highlighted text and open popup window DrakeSoft 2 2,930 Oct-29-2022, 04:30 PM
Last Post: DrakeSoft
  Figure Gets Larger Every time I click a show button joshuagreineder 2 2,121 Aug-11-2022, 06:25 AM
Last Post: chinky
  [PyQt] How can I sync Combobox index to other combobox index? nickzsche 2 3,278 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 6,506 Dec-10-2020, 07:48 PM
Last Post: Larz60+
  Tkinter - How can I remove the background borders from ttk.Button? TurboC 4 21,338 Oct-18-2020, 10:58 AM
Last Post: TurboC
  [tkinter] color change for hovering over button teacher 4 11,210 Jul-04-2020, 06:33 AM
Last Post: teacher

Forum Jump:

User Panel Messages

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