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 ...
随机推荐
- IOS开发 多线程编程 - NSOperationQueue
一.简介 一个NSOperation对象可以通过调用start方法来执行任务,默认是同步执行的.也可以将NSOperation添加到一个NSOperationQueue(操作队列)中去执行,而且是异步 ...
- learn go defer
package main // 参考文档: // https://github.com/Unknwon/the-way-to-go_ZH_CN/blob/master/eBook/06.4.md im ...
- 音乐随想——斯美塔那—G小调钢琴协奏曲
乐源 Music -> Piano Trio -> Smetana:Piano Trioin G minor Op.15 总结 每一乐章都会有一段美到极致的主旋律. 第一乐章 起头即有凄凉 ...
- IAuthenticationManager.SignOut 退不了
AuthenticationManager.SignOut(); 这个退不了,然后就加上 AuthenticationManager.SignOut( DefaultAuthenticatio ...
- IOI2002 POJ1054 The Troublesome Frog 讨厌的青蛙 (离散化+剪枝)
Description In Korea, the naughtiness of the cheonggaeguri, a small frog, is legendary. This is a we ...
- CSS格式化工具
一直想自己写个css格式化工具,因为原先的<CSS代码格式化和压缩化>工具,压缩or格式化的都不是我的编码习惯.我的格式化工具也许代码方面细节方面都没他的好,但是符合自身需要的东西才是好东 ...
- LeetCode 773. Sliding Puzzle
原题链接在这里:https://leetcode.com/problems/sliding-puzzle/description/ 题目: On a 2x3 board, there are 5 ti ...
- OPCDAAuto.dll 的一个坑
最近项目需要对SCADA系统的下位机采集实时数据,常见做法是两种,一种采用ModBus RTU/TCP协议直接通过支持ModBus的下位机通信,一种是通过OPC规范,使用厂商提供的OPC Server ...
- 关于NHibernate的一些代码
SessionManager using System; using System.IO; using System.Runtime.Serialization; using System.Runti ...
- STL 练习
makefile ------------------------------------- %.o : %.cpp g++ -g -c $< -o $@ all: t t2 rmXX % : ...