Tkinter PanedWindow
每个窗格中包含一个部件,每一双窗格由一个可移动的(通过鼠标移动)窗扇分开。移动窗扇导致要么被调整窗框侧面的部件.
语法:
这里是一个简单的语法来创建这个widget:
w = PanedWindow( master, option, ... )
参数:
master: 这代表了父窗口.
options:下面是这个小工具最常用的选项列表。这些选项可以作为键 - 值对以逗号分隔.
| Option | Description |
|---|---|
| bg | The color of the slider and arrowheads when the mouse is not over them. |
| bd | The width of the 3-d borders around the entire perimeter of the trough, and also the width of the 3-d effects on the arrowheads and slider. Default is no border around the trough, and a 2-pixel border around the arrowheads and slider. |
| borderwidth | Default is 2. |
| cursor | The cursor that appears when the mouse is over the window. |
| handlepad | Default is 8. |
| handlesize | Default is 8. |
| height | No default value. |
| orient | Default is HORIZONTAL. |
| relief | Default is FLAT. |
| sashcursor | No default value. |
| sashrelief | Default is RAISED. |
| sashwidth | Default is 2. |
| showhandle | No default value |
| width | No default value. |
方法:
spinbox对象有这些方法:
| Methods & Description |
|---|
| add(child, options) Adds a child window to the paned window. |
| get(startindex [,endindex]) This method returns a specific character or a range of text. |
| config(options) Modifies one or more widget options. If no options are given, the method returns a dictionary containing all current option values. |
例子:
自己尝试下面的例子。下面是如何创建3窗格部件:
from Tkinter import * m1 = PanedWindow()
m1.pack(fill=BOTH, expand=1) left = Label(m1, text="left pane")
m1.add(left) m2 = PanedWindow(m1, orient=VERTICAL)
m1.add(m2) top = Label(m2, text="top pane")
m2.add(top) bottom = Label(m2, text="bottom pane")
m2.add(bottom) mainloop()
这将产生以下结果:
Tkinter PanedWindow的更多相关文章
- gui - tkinter 开发
GUI 用户交互界面 tkinter 介绍 tkinter python自带的gui库,对图形图像处理库tk的封装 其他gui:pythonwin,wxpython,pyQT.. 概念介绍 组件:组成 ...
- python_tkinter组件
1.按钮 # 按钮 # bg设置背景色 btn = tkinter.Button(root,text = '按钮',bg = 'red') btn.pack() # fg设置前景色(文字颜色) btn ...
- GUI的最终选择 Tkinter(八):Message组件、Spinbox组件、PanedWindow组件、Toplevel组件
Message组件 Message(消息)组件是Label组件的变体,用于显示多行文本消息,Message组件能够自动执行,并调整文本的尺寸使其适应给定的尺寸. from tkinter import ...
- Tkinter 之PanedWindow标签
一.参数说明 参数 作用 background(bg) 设置背景颜色 borderwidth(bd) 设置边框宽度 cursor 指定当鼠标在PanedWindow上飘过的时候的鼠标样式 handl ...
- TKinter的常用组件
python提供了多个图形开发界面的库,几个常用Python GUI库如下: Tkinter: Tkinter模块("Tk 接口")是Python的标准Tk GUI工具包的接口.T ...
- Python GUI之tkinter窗口视窗教程大集合(看这篇就够了)
一.前言 由于本篇文章较长,所以下面给出内容目录方便跳转阅读,当然也可以用博客页面最右侧的文章目录导航栏进行跳转查阅. 一.前言 二.Tkinter 是什么 三.Tkinter 控件详细介绍 1. T ...
- python3内置的tkinter参数释疑
最近涉及到需要实现一个桌面UI的小游戏,所以就翻看了一些文档. 当然有介绍使用pyQT5的,但是本机安装的是python3.4,不想卸载掉这个版本,暂时还不能使用pyQT5. pyQT5需要pytho ...
- tkinter模块
Python GUI编程(Tkinter) Python 提供了多个图形开发界面的库,几个常用 Python GUI 库如下: Tkinter: Tkinter 模块(Tk 接口)是 Python 的 ...
- python---基础知识回顾(九)图形用户界面-------Tkinter
前戏:老牌python GUI程序(Tkinter) import tkinter.messagebox as messagebox class Application(Frame): def __i ...
随机推荐
- java 导入Excel -- 套路及代码分析
一.思路分析 1.我们要做导入,实际上也就是先文件上传,然后读取文件的数据. 2.我们要有一个导入的模板,因为我们导入的Excel列要和我们的数据字段匹配上,所以我们要给它来一个规定,也就是模板. 3 ...
- 访问路径、URL、资源加载、转码、 btn的设置、枚举
一.URL 1.什么是URL? URL是某个资源的唯一路径,通过这个路径就能访问对应的资源 2.URL的组成 协议头://全路径 * 协议头就代表资源的类型,比如http代表网络服务器资源,ftp代表 ...
- CocoaPods(pod install一直不动)
CocoaPods安装和使用教程 如何在Mac 终端升级ruby版本 RubyGems 镜像 cocoapods无法使用(mac os 10.11升级导致pod: command not found)
- CF1109A Sasha and a Bit of Relax
CF1109A Sasha and a Bit of Relax 用 \(xorsum[l,r]\) 表示 \(a[l] \oplus a[l+1] \oplus a[l+2]... a[r-1] \ ...
- 完美解决github访问速度慢[转]
1. 修改本地hosts文件 windows系统的hosts文件的位置如下:C:\Windows\System32\drivers\etc\hosts mac/linux系统的hosts文件的位置如下 ...
- nginx grpc 试用
1. 编译 wget https://nginx.org/download/nginx-1.13.10.tar.gz tar xvf nginx-1.13.10.tar.gz cd nginx-1.1 ...
- oracle之 sqlplus prelim 参数介绍 ( 处理hang )
从Oracle10g开始,sqlplus提供了一个参数选项-prelim,用这个参数,在系统已经hang的时候.我们可以连接到SGA而不是数据库,也就是说没有session被创建. 一. 通过以下步骤 ...
- POJ2503:Babelfish
浅谈\(Trie\):https://www.cnblogs.com/AKMer/p/10444829.html 题目传送门:http://poj.org/problem?id=2503 \(Trie ...
- webstorm配置scss的小结
1)安装ruby 2)安装sass 3)配置webstorm 打开webstrom ->file->setting->Tools->file watcher 添加scss pr ...
- 搭建一个免费的,无限流量的Blog----github Pages和Jekyll入门(转)
转自:http://www.ruanyifeng.com/blog/2012/08/blogging_with_jekyll.html 喜欢写Blog的人,会经历三个阶段. 第一阶段,刚接触Blog, ...