scrollbar ― 为在相关小部件中更改部分内容(通常是文本或图)而生成小部件。 text ― 创建显示一个或多个文本行并允许编辑该文本的小部件。 toplevel ― 创建新的顶级(在 X 桌面上)窗口。 调用演示 代码如下: package require Tk . configure -width 200 -height 400 label .header -text "Tk Tutorial Exa...
_scrollbar, AutoHideScrollbar) autohidescrollbar2 = kwargs.pop('autohidescrollbar', autohidescrollbar) if autohidescrollbar != autohidescrollbar2: self._scrollbar.destroy() if autohidescrollbar2: self._scrollbar = AutoHideScrollbar(self, orient=tk.VERTICAL, command=self.listbox.yview) ...
Scrollbar Scrolling widgets without a text or canvas widgets. 8 Scale Scale widget to choose a numeric value through sliders. Other Widgets Sr.No.Widget & Description 1 Canvas Drawing widget for displaying graphics and images.. We will cover each of these widgets in the upcoming chapters. Tk ...
(Tk itself is not part of Python; it is maintained at ActiveState.)在命令行中运行 python -m tkinter,应该会弹出一个Tk界面的窗口,表明 tkinter 包已经正确安装,而且告诉你 Tcl/Tk 的版本号,通过这个版本号,你就可以参考对应的 Tcl/Tk 文档了。
#-yscrollcommand {w.vs set} -xscrollcommand {$w.hs set} #scrollbarw.vs set} -xscrollcommand {$w.hs set} #scrollbartop.vs -command {top.can yview} #scrollbartop.can yview} #scrollbartop.hs -command {top.can xview} -orient horizontal #gridtop.can xview} -orient horizontal #...
scrollbar $itk_interior.sbar -command [code $itk_interior.info yview] } pack $itk_component(scrollbar) -side right -fill y eval itk_initialize $args } public method display {info} public method append {info} } body TextDisplay::display {info} { ...
An object created by the Tcl() object can have a Toplevel window created (and the Tk subsystem initialized) by calling its loadtk() method. Other modules that provide Tk support include: tkinter.scrolledtext Text widget with a vertical scroll bar built in. tkinter.colorchooser Dialog to let...
tkMacWinMenu.c tkMain.c tkMenu.c tkMenu.h tkMenuDraw.c tkMenubutton.c tkMenubutton.h tkMessage.c tkObj.c tkOldConfig.c tkOldTest.c tkOption.c tkPack.c tkPanedWindow.c tkPlace.c tkPlatDecls.h tkPointer.c tkPort.h tkRectOval.c tkScale.c tkScale.h tkScrollbar.c tkScrollbar....
Tkd requires version8.6(or greater) of the Tcl/Tk libraries installed. A small exception is when creating a self-contained installation on Windows. See details below. Tcl/Tk itself requires the x11 libraries installed on Linux only. Windows ...
An object created by the Tcl() object can have a Toplevel window created (and the Tk subsystem initialized) by calling its loadtk() method. Other modules that provide Tk support include: tkinter.scrolledtext Text widget with a vertical scroll bar built in. tkinter.colorchooser Dialog to let...