tkinter: Round Button - Any idea?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • akineko

    tkinter: Round Button - Any idea?

    Hello everyone,

    I'm trying to implement a virtual instrument, which has buttons and
    displays, using Tkinter+Pmw.
    One of items on the virtual instrument is a round button.
    This is imitating a tact switch.

    Tkinter has a Button class, which I can assign a button image.
    However, when the button is depressed, the rectangle is sunken (rather
    than the round button).

    Probably I need to prepare two images, normal one and depressed one,
    and implement all button behaviours by myself.
    But before reinventing everything by myself, I'm wondering if there is
    an easy way to implement or there is existing widget example of such
    button.
    So far, I couldn't find any good examples.

    Any suggestions are highly appreciated.

    Best regards,
    Aki Niimura
  • George Trojan

    #2
    Re: tkinter: Round Button - Any idea?

    akineko wrote:
    Hello everyone,
    >
    I'm trying to implement a virtual instrument, which has buttons and
    displays, using Tkinter+Pmw.
    One of items on the virtual instrument is a round button.
    This is imitating a tact switch.
    >
    Tkinter has a Button class, which I can assign a button image.
    However, when the button is depressed, the rectangle is sunken (rather
    than the round button).
    >
    Probably I need to prepare two images, normal one and depressed one,
    and implement all button behaviours by myself.
    But before reinventing everything by myself, I'm wondering if there is
    an easy way to implement or there is existing widget example of such
    button.
    So far, I couldn't find any good examples.
    >
    Any suggestions are highly appreciated.
    >
    Best regards,
    Aki Niimura
    Try
    http://search.cpan.org/~darnold/Tk-S...yledButton.pod.
    This is Perl, but it might be worthwhile to take a look at implementation.

    George

    Comment

    Working...