New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Request] Implement app.getXXXBg() API #373

Closed
frakman1 opened this Issue Feb 12, 2018 · 2 comments

Comments

Projects
None yet
2 participants
@frakman1
Contributor

frakman1 commented Feb 12, 2018

Currently, I can write a color to a label using this method:

    app.setLabelBg(title, col)

However, there is no equivalent 'get' method like:

    app.getLabelBg(title, col)

This would be very a useful and is highly desirable feature to have.

jarvisteach added a commit that referenced this issue Feb 12, 2018

@jarvisteach

This comment has been minimized.

Owner

jarvisteach commented Feb 12, 2018

Although not directly supported through appJar functions, you can easily find out the bg of a widget using standard tkinter functions, get("bg"):

from appJar import gui

def changeColour():
    app.label("DEMO", bg=app.colourBox())
    app.label("DEMO", app.getLabelWidget("DEMO").cget("bg"))

with gui("Colours", "400x400", sticky="news") as app:
    app.label("DEMO", submit=changeColour)

jarvisteach added a commit that referenced this issue Feb 12, 2018

jarvisteach added a commit that referenced this issue Feb 13, 2018

getXXXBg() Function #373
Added new function for getting the BG of a widget, and use it in
accessibility #328

@jarvisteach jarvisteach added this to the 1.0 milestone Feb 13, 2018

@jarvisteach

This comment has been minimized.

Owner

jarvisteach commented Feb 13, 2018

next_release now has a .getXXXBg() function.

Long-term, I think a function called .getXXXProperty() will be easier to manage, just a wrapper on cget.

jarvisteach added a commit that referenced this issue Feb 13, 2018

Updates to #328
Added tooltips, reset button, and loading of current settings

Also, moved `getXXXBg()` to use `getWidgetProperty()` #373
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment