Closed RickyAsbury closed 3 years ago
menu.remove_widget(my_widget) should be fine
How would you get "my_widget" exactly did I have to do something before I add the buttons in the menu?
On Mon, Feb 22, 2021, 7:10 AM Pablo Pizarro R. notifications@github.com wrote:
menu.remove_widget(my_widget) should be fine
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ppizarror/pygame-menu/issues/295#issuecomment-783329682, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASDDLO4BZZYGCGT3VZLRR2LTAJCSZANCNFSM4X7XNGGA .
you need the reference, there's two options:
Ok I'll try that tomorrow thank you
On Mon, Feb 22, 2021, 5:17 PM Pablo Pizarro R. notifications@github.com wrote:
you need the reference, there's two options:
- mywidget= menu.add_.....
- mywidget = menu.get_widget('mywidgetID')
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ppizarror/pygame-menu/issues/295#issuecomment-783714796, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASDDLO4LVPK2EMXVQQNZKUDTALJWJANCNFSM4X7XNGGA .
I've added the possibility to select the widgets and remove the widgets from the id. For example
menu.remove_widget('myWidgetID')
This is only a shorthand for menu.remove_widget(menu.get_widget('myWidgetID'))
but it's easier to understand.
The new version v3.5.7 has been published :) I'll close this issue for now
I'm trying to remove buttons on a menu; I tried using the remove_widget function; is there a specific thing I'm supposed to type for trying to do it that way or do I have to use something else?