FAQ
I know how to switch a label from text to an image; simply config the
image property to an existing image.

But how do you do the opposite? Once a label displays an image, how do
you switch it back to displaying text? Setting the image property to
None doesn't seem to do the trick.

By the way, I initially tried to write my (very simple) app with
wxPython, but couldn't deal with the documentation.

Search Discussions

  • James Stroud at Dec 13, 2005 at 10:29 pm

    headspin wrote:
    I know how to switch a label from text to an image; simply config the
    image property to an existing image.

    But how do you do the opposite? Once a label displays an image, how do
    you switch it back to displaying text? Setting the image property to
    None doesn't seem to do the trick.

    By the way, I initially tried to write my (very simple) app with
    wxPython, but couldn't deal with the documentation.
    From the Tk documentation

    "Typically, if the image option is specified then it overrides other options
    that specify a bitmap or textual value to display in the widget; the image
    option may be reset to an empty string to re-enable a bitmap or text display."

    So try setting to an empty string instead of None.

    For many Tkinter issues, you can try:
    <http://www.astro.princeton.edu/~rhl/Tcl-Tk_docs/tk8.0a1/contents.html>

    James

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppython-list @
categoriespython
postedDec 13, '05 at 9:33p
activeDec 13, '05 at 10:29p
posts2
users2
websitepython.org

2 users in discussion

James Stroud: 1 post Headspin: 1 post

People

Translate

site design / logo © 2022 Grokbase