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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

variablewidthwraplengthMethods on radiobutton objects include:.deselect()Clears (turns off) the radiobutton..flash()The control variable that this radiobutton shareswith the other radiobuttons in the group. This canbe either an IntVar or a StringVar.The default width of a radiobutton is determinedby the size of the displayed image or text. You canset this option to a number of characters and theradiobutton will always have room <strong>for</strong> that manycharacters.Normally, lines are not wrapped. You can set thisoption to a number of characters and all lines willbe broken into pieces no longer than that number.Flashes the radiobutton a few times between its active and normal colors, but leaves itthe way it started..invoke()You can call this method to get the same actions that would occur if the user clicked onthe radiobutton to change its state..select()Sets (turns on) the radiobutton.14. The Scale widgetThe purpose of a scale widget is to allow the user to set some integer or float value withina specified range. Here are two scale widgets, one horizontal and one vertical:Each scale displays a slider that the user can drag along a trough to change the value. Inthe figure, the first slider is currently at -0.38 and the second at 7. You can drag the slider to a new value with mouse button 1. If you click button 1 in the trough, the slider will move one increment in thatdirection per click. Holding down button 1 in the trough will, after a delay, start toauto-repeat its function.New Mexico Tech Computer Center <strong>Tkinter</strong> <strong>reference</strong>: The Scale widget Page 43

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

Saved successfully!

Ooh no, something went wrong!