Re: [Tkinter-discuss] PanedWindow widget

2018-03-04 Thread Serhiy Storchaka

03.03.18 23:13, adil gourinda пише:

print(help(tkinter.PanedWindow.paneconfigure))


print() is not needed here. help() itself prints the description.


I have two questions:
-Does "tagOrId" is the equivalent of "window" in TCL?


Yes, it is.

-What is "cnf" parameter which is present in all Tkinter classes and 
methods?


A dict of options. You can specify options either as keyword arguments

paneconfigure(wnd, height=200, width=100)

or as a dict (if you have a variable set of options).

options = {}
options['height'] = 200
options['width'] = 100
paneconfigure(wnd, options)

or even combine both ways

paneconfigure(wnd, options, padx=10, pady=5)

In modern Python this parameter mostly redundant since you can pass a 
variable number of keyword arguments as **options.


paneconfigure(wnd, **options, padx=10, pady=5)

This output return the description of two Tcl commands (pathName *sash 
coord* index and pathName *sash dragto* index x y) in one  Tkinter 
methods, is it an error?


This looks like a bug. Please open an issue on https://bugs.python.org/.

___
Tkinter-discuss mailing list
Tkinter-discuss@python.org
https://mail.python.org/mailman/listinfo/tkinter-discuss


[Tkinter-discuss] PanedWindow widget

2018-03-03 Thread adil gourinda
I) If you type in IDLE:
==
import tkinter
print(help(tkinter.PanedWindow.paneconfigure))
==

you get:
==
paneconfigure(self, tagOrId, cnf=None, **kw)
==

I have two questions:
-Does "tagOrId" is the equivalent of "window" in TCL?
-What is "cnf" parameter which is present in all Tkinter classes and methods?

II) If you type in IDLE:
==
import tkinter
print(help(tkinter.PanedWindow.sash_coord))
==

you get:
==
sash_coord(self, index)
Return the current x and y pair for the sash given by index.

Index must be an integer between 0 and 1 less than the
number of panes in the panedwindow. The coordinates given are
those of the top left corner of the region containing the sash.
   + ---
   | pathName sash dragto index x y This command computes the
   | difference between the given coordinates and the coordinates
   | given to the last sash coord command for the given sash. It then
   | moves that sash the computed difference. The return value is the
   | empty string.
   + ---
==

This output return the description of two Tcl commands (pathName sash coord 
index and pathName sash dragto index x y) in one  Tkinter methods, is it an 
error?


Thanks for your attention

___
Tkinter-discuss mailing list
Tkinter-discuss@python.org
https://mail.python.org/mailman/listinfo/tkinter-discuss