zoukankan      html  css  js  c++  java
  • Widget Options

    Some Common Widget Options

    The capitalized word must be replaced with any of the bold words. Check the manual for all the options. Also make sure that the widget you are using support the option you are using.
    -anchor POSITION Position widget relative to: n ne nw s se sw e w or center.
    -background COLOR Background color.
    -bitmap BITMAP Shows a small image. BITMAP must be error, gray12, gray25, gray50, gray75, hourglass, info, questhead, question, warning or @filename.
    -borderwidth WIDTH Width of border. Choosing '0' will hide the border.
    -command SCRIPT Executes SCRIPT when invoked.
    -cursor CURSOR Mouse cursor to display when mouse in this widget.
    -disabledforeground COLOR Foreground color when the widget is disabled.
    -font FONTNAME Use fontname for text style. It is given in this format - FONTNAME SIZE STYLE. For example, -font "fixed 12 bold".
    -foreground COLOR Foreground when the state of the widget is normal.
    -geometry WIDTHXHEIGHT Can sets horizontal (and optionally vertical) widget size.
    -height VALUE Set vertical height of the widget.
    -image IMAGE The image to display in widget.
    -justify JUSTIFICATION Multi-line justification: left, right or center.
    -orient ORIENTATION For objects like scale and scrollbar. Must be horizontal or vertical(or h or v).
    -padx NUMBER Horizontal padding. The space on top and bottom of the given widget. For example, -padx 5.
    -pady NUMBER Vertical padding. This is the space on either side of the given widget. For example, -pady 2.
    -relief RELIEF 3D bevel border - RELIEF must be flat, groove, raised, ridge, solid or sunken. Very useful when using frame.
    -state STATE Set widget to: normal, disabled or active.
    -text STRING Display text string.
    -variable VARNAME Display text variable. If the widget is manipulated, the value of the variable will change automatically and if this variable's value is changed, the widget will change to reflect the changes in the variable.
    -underline CHAR Which character position in string to underline. This must be a number - 0 for the first character, 1 for the second and so on.
    -width WIDTH Sets horizontal widget size.
    -wraplength LENGTH Word wrapping maximum string length.

  • 相关阅读:
    spring揭密学习笔记(3)-spring ioc容器:Spring的IoC容器之BeanFactory
    spring揭密学习笔记(3)-spring ioc容器:掌管大局的IoC Service Provider
    spring揭密学习笔记(2)-spring ioc容器:IOC的基本概念
    spring揭密学习笔记(1) --spring的由来
    spring揭密学习笔记
    spring事务管理实现原理-源码-传播属性
    spring事务传播实现源码分析
    IDEA搭建Spring框架环境
    ScrollView滑动的监听
    Android对apk源代码的改动--反编译+源代码改动+又一次打包+签名【附HelloWorld的改动实例】
  • 原文地址:https://www.cnblogs.com/greencolor/p/2079602.html
Copyright © 2011-2022 走看看