carousel::carousel
- Create and manipulate carousel widgetscarousel::carousel pathName ?options?
-background or -bg
-borderwidth or -bd
-cursor
-height
-relief
-state
-takefocus
-width
-xscrollcommand
-animate value
-padx pixels
-pady pixels
-reflect saturation
-reflectblur saturation
pathName bind
index ?sequence? ?script?
pathName cget
option
pathName configure
?option? ?value? ?option value ...?
pathName delete
first ?last?
pathName index
index
pathName insert
index type ?options?
pathName itemcget
index option
pathName itemconfigure
index ?option? ?value? ?option value ...?
pathName setcurrent
index
pathName size
pathName xview
args
pathName xview
pathName xview moveto fraction
pathName xview scroll number what
carousel::carousel
- Create and manipulate carousel widgetscarousel::carousel pathName ?options?
-borderwidth
-cursor
-font
-relief
-state
-takefocus
-variable
Command-Line Name: | -animate |
Database Name: | animate |
Database Class: | Animate |
If set to a boolean value of true, adds some small animations to the carousel when items are rotated. If set to a boolean value of false, no additional animations are made. The animations help give the carousel a more fluid look. Defaults to true.
Command-Line Name: | -padx |
Database Name: | padX |
Database Class: | Pad |
Specifies the amount of horizontal padding (in pixels) between the current item and the items to the left and right of the current item. This padding value is also used to calculate the number of horizontal pixels between the outer edges of the other displayed items.
Command-Line Name: | -pady |
Database Name: | padY |
Database Class: | Pad |
Specifies the amount of vertical padding (in pixels) between the current item and the top and bottom edges of the widget.
Command-Line Name: | -reflect |
Database Name: | reflect |
Database Class: | Reflect |
If this option is set to a value greater than 0, turns on reflections and the value (fraction within the range of >0 to 1) specifies the amount of saturation in the reflection. The lower the value, the more subtle the reflection. A value of 1.0 will essentially create an inverted copy of the original image beneath the displayed item. A value of 0 will disable reflections. Default is 0.2.
Command-Line Name: | -reflectblur |
Database Name: | reflectBlur |
Database Class: | ReflectBlur |
Specifies the amount of reflection blurring that should occur. A value of 0 is no blur while a value of 1 is complete blurring. The default is 0.5. This option is only valid if the -reflect option is set to a value greater than 0.
carousel::carousel
command creates a new window named
pathName
and of the class Carousel
, and makes it
into a carousel widget. Additional options, described above, may be
specified on the command-line or in the option database to configure aspects of the
carousel. The carousel::carousel
command
returns its pathName
argument. At the time this command
is invoked, there must not exist a window named pathName
, but
pathName
's parent must exist.
-dash . → -dash {2 4} -dash - → -dash {6 4} -dash -. → -dash {6 4 2 4} -dash -.. → -dash {6 4 2 4 2 4} -dash {. } → -dash {2 8} -dash , → -dash {4 4}
carousel::carousel
command creates a new Tcl command whose
name is pathName
. This command may be used to invoke various
operations on the widget. It has the following general form:
pathName option ?arg arg ...?
option
and the arg
determine the exact behavior
of the command. The following commands are possible for carousel widgets:
pathName bind index ?sequence? ?script?
pathName cget option
pathName configure ?option? ?value option value ...?
pathName delete first ?last?
pathName index index
pathName insert index type ?options?
pathName itemcget index option
pathName itemconfigure index ?option? ?value? ?option value ...?
pathName setcurrent index
pathName size
pathName xview args
pathName xview
-xscrollcommand
option.
pathName xview moveto fraction
pathName xview scroll number what
[expr $item_width / $item_height.0]
. This option
will default to a value of 1 (will have the effect of drawing a square or a
circle if the rectangle or oval item type is specified, respectively).
pathName insert index image options
-state
pathName insert index rectangle options
-ratio
-dash
-fill
-offset
-outline
-outlineoffset
-outlinestipple
-stipple
-state
-width
pathName insert index oval options
-ratio
-dash
-fill
-offset
-outline
-outlineoffset
-outlinestipple
-stipple
-state
-width
Configure
event causes the Carousel to be resized according
to the winfo width
and winfo height
returned values.
This causes the carousel items to be resized and spaced accordingly.
Destroy
event causes any images created/stored by the widget
to be deleted.
Tab
key causes the focus to be moved to the next widget
in the focus list.
FocusIn
event causes the carousel to receive the focus
if the -takefocus widget option is set to a boolean true value.
Right
and Left
keys cause the carousel to advance
the carousel one item to the right or left, respectively.
Shift-Right
and Shift-Left
keys cause the
carousel to advance one page (i.e., one screenful) to the right or left,
respectively.
Home
key causes the carousel to make the first item the
current item.
End
key causes the carousel to make the last item the
current item.
MouseWheel
event causes the carousel to rotate one item to
the right (when the mouse wheel is scrolled down) or one item to the left
(when the mouse wheel is scrolled up).
Shift-MouseWheel
event causes the carousel to rotate one
page to the right (when the mouse wheel is scrolled down) or one page to the
left (when the mouse wheel is scrolled up).