ttk::scrollbar - Online Linux Manual PageSection : n
Updated : 8.5
Source : Tk
Note : Tk Themed Widget


NAMEttk::scrollbar − Control the viewport of a scrollable widget

SYNOPSISttk::scrollbar pathName ?options...? .\}

DESCRIPTIONttk::scrollbar widgets are typically linked to an associated window that displays a document of some sort, such as a file being edited or a drawing. A scrollbar displays a thumb in the middle portion of the scrollbar, whose position and size provides information about the portion of the document visible in the associated window. The thumb may be dragged by the user to control the visible region. Depending on the theme, two or more arrow buttons may also be present; these are used to scroll the visible region in discrete units.

STANDARD OPTIONS−class −cursor −style −takefocus See the ttk_widget manual entry for details on the standard options.

WIDGET-SPECIFIC OPTIONS [ −command command ] A Tcl script prefix to evaluate to change the view in the widget associated with the scrollbar. Additional arguments are appended to the value of this option, as described in SCROLLING COMMANDS below, whenever the user requests a view change by manipulating the scrollbar. This option typically consists of a two-element list, containing the name of a scrollable widget followed by either xview (for horizontal scrollbars) or yview (for vertical scrollbars). [ −orient orient ] One of horizontal or vertical. Specifies the orientation of the scrollbar.

WIDGET COMMANDpathName cget option  Returns the current value of the specified option; see ttk::widget(n). pathName configure ?option? ?value option value ...?  Modify or query widget options; see ttk::widget(n). pathName get  Returns the scrollbar settings in the form of a list whose elements are the arguments to the most recent set widget command. pathName identify x y  Returns the name of the element at position x, y. See ttk::widget(n). pathName instate statespec ?script?  Test the widget state; see ttk::widget(n). pathName set first last  This command is normally invoked by the scrollbar's associated widget from an −xscrollcommand or −yscrollcommand callback. Specifies the visible range to be displayed. first and last are real fractions between 0 and 1. pathName state ?stateSpec?  Modify or query the widget state; see ttk::widget(n).

INTERNAL COMMANDSThe following widget commands are used internally by the TScrollbar widget class bindings. pathName delta deltaX deltaY  Returns a real number indicating the fractional change in the scrollbar setting that corresponds to a given change in thumb position. For example, if the scrollbar is horizontal, the result indicates how much the scrollbar setting must change to move the thumb deltaX pixels to the right (deltaY is ignored in this case). If the scrollbar is vertical, the result indicates how much the scrollbar setting must change to move the thumb deltaY pixels down. The arguments and the result may be zero or negative. pathName fraction x y  Returns a real number between 0 and 1 indicating where the point given by x and y lies in the trough area of the scrollbar, where 0.0 corresponds to the top or left of the trough and 1.0 corresponds to the bottom or right. X and y are pixel coordinates relative to the scrollbar widget. If x and y refer to a point outside the trough, the closest point in the trough is used.

SCROLLING COMMANDSWhen the user interacts with the scrollbar, for example by dragging the thumb, the scrollbar notifies the associated widget that it must change its view. The scrollbar makes the notification by evaluating a Tcl command generated from the scrollbar's −command option. The command may take any of the following forms. In each case, prefix is the contents of the −command option, which usually has a form like .t yview prefix moveto fraction  Fraction is a real number between 0 and 1. The widget should adjust its view so that the point given by fraction appears at the beginning of the widget. If fraction is 0 it refers to the beginning of the document. 1.0 refers to the end of the document, 0.333 refers to a point one-third of the way through the document, and so on. prefix scroll number units  The widget should adjust its view by number units. The units are defined in whatever way makes sense for the widget, such as characters or lines in a text widget. Number is either 1, which means one unit should scroll off the top or left of the window, or −1, which means that one unit should scroll off the bottom or right of the window. prefix scroll number pages  The widget should adjust its view by number pages. It is up to the widget to define the meaning of a page; typically it is slightly less than what fits in the window, so that there is a slight overlap between the old and new views. Number is either 1, which means the next page should become visible, or −1, which means that the previous page should become visible.

WIDGET STATESThe scrollbar automatically sets the disabled state bit. when the entire range is visible (range is 0.0 to 1.0), and clears it otherwise. It also sets the active and pressed state flags of individual elements, based on the position and state of the mouse pointer.

EXAMPLEset f [frame .f] ttk::scrollbar $f.hsb −orient horizontal −command [list $f.t xview] ttk::scrollbar $f.vsb −orient vertical −command [list $f.t yview] text $f.t −xscrollcommand [list $f.hsb set] −yscrollcommand [list $f.vsb set] grid $f.t −row 0 −column 0 −sticky nsew grid $f.vsb −row 0 −column 1 −sticky nsew grid $f.hsb −row 1 −column 0 −sticky nsew grid columnconfigure $f 0 −weight 1 grid rowconfigure $f 0 −weight 1 pack $f

STYLING OPTIONSThe class name for a ttk::scrollbar is TScrollbar. Dynamic states: active, disabled. TScrollbar (or more specifically Vertical.TScrollbar and Horizontal.TScrollbar) styling options that are configurable with ttk::style are: −arrowcolor color
−arrowsize amount
−background color
−bordercolor color
−darkcolor color (color of the dark part of the 3D relief)
−foreground color
−gripcount count (number of lines on the thumb)
−lightcolor color (color of the light part of the 3D relief)
−troughcolor color
Some options are only available for specific themes. See the ttk::style manual page for information on how to configure ttk styles.

SEE ALSOttk::widget(n), scrollbar(n)

KEYWORDSscrollbar, widget
0
Johanes Gumabo
Data Size   :   25,370 byte
man-ttk_scrollbar.nBuild   :   2024-12-05, 20:55   :  
Visitor Screen   :   x
Visitor Counter ( page / site )   :   3 / 202,954
Visitor ID   :     :  
Visitor IP   :   18.216.167.229   :  
Visitor Provider   :   AMAZON-02   :  
Provider Position ( lat x lon )   :   39.962500 x -83.006100   :   x
Provider Accuracy Radius ( km )   :   1000   :  
Provider City   :   Columbus   :  
Provider Province   :   Ohio ,   :   ,
Provider Country   :   United States   :  
Provider Continent   :   North America   :  
Visitor Recorder   :   Version   :  
Visitor Recorder   :   Library   :  
Online Linux Manual Page   :   Version   :   Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 24.12.05
Online Linux Manual Page   :   Library   :   lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Online Linux Manual Page   :   Library   :   lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Data Base   :   Version   :   Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38
Data Base   :   Library   :   lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36

Very long time ago, I have the best tutor, Wenzel Svojanovsky . If someone knows the email address of Wenzel Svojanovsky , please send an email to johanes_gumabo@yahoo.co.id .
If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.

ERROR : Need New Coding :         (rof_escape_sequence_block|26|(null)|(null)|-1|140)         (parse_manual_page_|249|ttk_scrollbar.n|281/140|══─}─══|.══─}─══ )         (htmlprn|149|ttk_scrollbar.n|281/140|.══─}─══|.══─}─══ )         (rof_escape_sequence|91|ttk_scrollbar.n|281/141|\}|.\} )         (parse_manual_page_|249|ttk_scrollbar.n|281/141|\}|.\} )         (rof_OP|10|ttk_scrollbar.n|298|4|.OP \-command command Command )         (rof_OP|10|ttk_scrollbar.n|311|4|.OP \-orient orient Orient )