jarvisteach / appJar

Simple Tkinter GUIs in Python
http://appJar.info
Other
615 stars 68 forks source link

Rename CheckBox Text #578

Closed chrisw-thomas closed 5 years ago

chrisw-thomas commented 5 years ago

Query


Context


I need to define a sub-window containing several named check boxes.

I want to use this sub-window at various points and so need to change the text associated with each check box. The text will be created dynamically as the application is used so I can't just create one or two sub-windows and pop them up.

There doesn't seem to be any way to update the text associated with a check box once it's been created?

I could just keep creating new sub-windows each time but this doesn't seem to be an efficient approach. I seem to recall that deleting widgets doesn't always work or is not supported?

There was a similar request for renaming an option in an option list.

Ideally it would look something like app.renameCheckBox(name, new_title)

jarvisteach commented 5 years ago

This can definitely be added, for now you can use the tkinter config function to manipulate widgets: app.getCheckBoxWidget('check').config(text='new text')

jarvisteach commented 5 years ago

Implemented in the next release: app.setCheckBoxText(title, text)