12.07.2015 Views

Tkinter reference: A GUI for Python

Tkinter reference: A GUI for Python

Tkinter reference: A GUI for Python

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Insert one or more new lines into the listbox be<strong>for</strong>e the line specified by index. Use ENDas the first argument if you want to add new lines to the end of the listbox..nearest ( y )Return the index of the visible line closest to the y-coordinate y relative to the listboxwidget..see ( index )Adjust the position of the listbox so that the line referred to by index is visible..selection_clear ( first, last=None )Unselects all of the lines between indices first and last, inclusive.argument is omitted, unselects the line with index first..selection_includes ( index )Returns 1 if the line with the given index is selected, else returns 0..selection_set ( first, last=None )If the secondSelects all of the lines between indices first and last, inclusive. If the second argumentis omitted, selects the line with index first..size()Returns the number of lines in the listbox..xview()To make the listbox horizontally scrollable, set the command option of the associatedhorizontal scrollbar to this method. See Scrolling a Listbox widget, below..xview_moveto ( fraction )Scroll the listbox so that the leftmost fraction of the width of its longest line is outsidethe left side of the listbox. Fraction is in the range [0; 1]..xview_scroll ( number, what )Scrolls the listbox horizontally. For the what argument, use either "units" to scroll bycharacters, or "pages" to scroll by pages, that is, by the width of the listbox. The numberargument tells how many to scroll; negative values move the listbox leftward relative tothe text, positive values rightward..yview()To make the listbox vertically scrollable, set the command option of the associated verticalscrollbar to this method. See Scrolling a Listbox widget, below..yview_moveto ( fraction )Scroll the listbox so that the top fraction of the width of its longest line is outside theleft side of the listbox. Fraction is in the range [0; 1]..yview_scroll ( number, what )Scrolls the listbox vertically. For the what argument, use either "units" to scroll by lines,or "pages" to scroll by pages, that is, by the height of the listbox. The number argumenttells how many to scroll; negative values move the listbox upward relative to the text,positive values downward.New Mexico Tech Computer Center <strong>Tkinter</strong> <strong>reference</strong>: The Listbox widget Page 33

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!