[Tkinter-discuss] configure command

Michael Lange klappnase at web.de
Wed Mar 7 17:14:24 EST 2018


Hi,

On Wed, 7 Mar 2018 13:46:40 +0000
adil gourinda <rikudou__sennin at live.com> wrote:

> For the last time, what is the parameter's name that accepts option's
> name as a string:
> 
> instance.configure(?!?!="option")
> 
> I hope I was clear this time.

ok, I got it now :)
As Brian pointed out, there is no literal parameter name here in Python,
however (to make things a bit more confusing :) technically speaking you
can use "cnf" as keyword-parameter here (although "cnf" is usually
supposed to be a {"option":"value"} dict), so e.g.:

  >>> widget.configure('bd')
  ('borderwidth', 'borderWidth', 'BorderWidth', <pixel object at
  0x560e10a6ac20>, 0)

is equal to

  >>> widget.configure(cnf='bd')
  ('borderwidth', 'borderWidth', 'BorderWidth', <pixel object at
  0x560e10a6ac20>, 0)


Regards

Michael


.-.. .. ...- .   .-.. --- -. --.   .- -. -..   .--. .-. --- ... .--. . .-.

You can't evaluate a man by logic alone.
		-- McCoy, "I, Mudd", stardate 4513.3


More information about the Tkinter-discuss mailing list