Making a Label that looks the same as a button.
Dustan
DustanGroups at gmail.com
Tue Jun 13 15:25:59 EDT 2006
Cameron Laird wrote:
> In article <mailman.6967.1150206949.27775.python-list at python.org>,
> Grayson, John <John.Grayson at gdc4s.com> wrote:
> >
> >
> >
> >Buttons can look like labels without the need to create another object -
> >just remove the
> >Command binding, set state to DISABLED and disabledforeground='same
> >color as NORMAL'...
> >
> >This demonstrates how to play with button styles:
> .
> .
> .
> John, as I read the original poster, Tkinter.DISABLED is *exactly*
> what he wants (although he might not realize it yet); I suspect
> there's no need at all for other styling.
>
> Are Button and Label styles truly identical except for
> disabledforeground? While I can't make the time now to research
> this for myself, it surprises me; I thought there were padding
> differences ...
>
> Your remark about the Command has me curious: why remove it? In
> terms of the original poster's description, what does this serve?
> I repeat my speculation that Tkinter.DISABLED will "do it all" for
> him.
Yes, that's what I needed (and I knew about that before), but I didn't
know about the disabledforeground option. Thanks for the information;
it worked nicely.
More information about the Python-list
mailing list