tkinter孪生文本框(peer)
Text的peers
这个标题的名字一看有点抽象,其实是这样的。
在tkinter中,文本框(Text)有两个派生自peer
的方法,peer_create
, peer_names
,也没有什么人介绍过。tcl官网的解释如下:
This command is used to create and query widget peers.
两个方法的解释:
pathName peer create newPathName ?options?
Creates a peer text widget with the given newPathName, and any optional standard configuration options (as for the text command). By default the peer will have the same start and end line as the parent widget, but these can be overridden with the standard configuration options.
pathName peer names
Returns a list of peers of this widget (this does not include the widget itself). The order within this list is undefined.