diff options
Diffstat (limited to 'doc/ttk_image.n')
-rw-r--r-- | doc/ttk_image.n | 38 |
1 files changed, 24 insertions, 14 deletions
diff --git a/doc/ttk_image.n b/doc/ttk_image.n index 34dbabb..300a0e4 100644 --- a/doc/ttk_image.n +++ b/doc/ttk_image.n @@ -10,7 +10,7 @@ .SH NAME ttk_image \- Define an element based on an image .SH SYNOPSIS -\fBttk::style element create \fIname\fR \fBimage\fR \fIimageSpec\fR ?\fIoptions\fR? +\fBttk::style element create \fIname \fBimage\fI imageSpec\fR ?\fIoptions\fR? .BE .SH DESCRIPTION .PP @@ -25,24 +25,30 @@ in a particular state or combination of states. .SH OPTIONS .PP Valid \fIoptions\fR are: +.\" OPTION: -border .TP -\fB\-border\fR \fIpadding\fR +\fB\-border\fI padding\fR +. \fIpadding\fR is a list of up to four integers, specifying the left, top, right, and bottom borders, respectively. If fewer than four elements are specified, \fIbottom\fR defaults to \fItop\fR, \fIright\fR defaults to \fIleft\fR, and \fItop\fR defaults to \fIleft\fR. -In other words, a list of three numbers specify the left, vertical, and right border; -a list of two numbers specify the horizontal and the vertical border; +In other words, a list of three numbers specify the left, vertical, and right +border; a list of two numbers specify the horizontal and the vertical border; a single number specifies the same border all the way around the element. See \fBIMAGE STRETCHING\fR, below. +.\" OPTION: -height .TP \fB\-height \fIheight\fR +. Specifies a minimum height for the element. -If less than zero, the base image's height is used as a default. +If negative, the base image's height is used as a default. +.\" OPTION: -padding .TP -\fB\-padding\fR \fIpadding\fR +\fB\-padding\fI padding\fR +. Specifies the element's interior padding. The padding is a list of up to four length specifications \fIleft top right bottom\fR. @@ -50,12 +56,14 @@ If fewer than four elements are specified, \fIbottom\fR defaults to \fItop\fR, \fIright\fR defaults to \fIleft\fR, and \fItop\fR defaults to \fIleft\fR. -In other words, a list of three numbers specify the left, vertical, and right padding; -a list of two numbers specify the horizontal and the vertical padding; +In other words, a list of three numbers specify the left, vertical, and right +padding; a list of two numbers specify the horizontal and the vertical padding; a single number specifies the same padding all the way around the widget. Defaults to \fB\-border\fR if not specified. +.\" OPTION: -sticky .TP -\fB\-sticky\fR \fIspec\fR +\fB\-sticky\fI spec\fR +. Specifies how the image is placed within the final parcel. \fIspec\fR contains zero or more characters .QW n , @@ -63,10 +71,12 @@ Specifies how the image is placed within the final parcel. .QW w , or .QW e . +.\" OPTION: -width .TP \fB\-width \fIwidth\fR +. Specifies a minimum width for the element. -If less than zero, the base image's width is used as a default. +If negative, the base image's width is used as a default. .SH "IMAGE STRETCHING" .PP If the element's allocated parcel is larger than the image, @@ -85,12 +95,12 @@ as a background image) should use \fB\-width 0\fR and \fB\-height 0\fR. .SH "EXAMPLE" .PP .CS -set img1 [image create photo \-file button.png] -set img2 [image create photo \-file button-pressed.png] -set img3 [image create photo \-file button-active.png] +set img1 [image create photo -file button.png] +set img2 [image create photo -file button-pressed.png] +set img3 [image create photo -file button-active.png] ttk::style element create Button.button image \e [list $img1 pressed $img2 active $img3] \e - \-border {2 4} \-sticky we + -border {2 4} -sticky we .CE .SH "SEE ALSO" ttk::intro(n), ttk::style(n), ttk_vsapi(n), image(n), photo(n) |