tkinter
graph LR;
id0(start) --> id1((S1)) --> id2((S2)) --> id3((S3)) --> id4(end);
graph LR;
id0(start) --> id1((S1)) <--> id2((S2)) <--> id3((S3));
id1((S1)) <--> id5((S4));
id5((S4)) <--> id2((S2));
id3((S3)) --> id4(end);
id2((S2)) --> id4(end);
id5((S4)) --> id4(end);
tkinter
, PySide
, and
wxPython
tkinter
Moduletkinter
Module (1)tkinter
TK Inteface
tkinter
to be usedimport tkinter
tkinter
is a platform independent
package that consists of a variety of GUI elements
tkinter
Module (2)tkinter
Widgets
iWidget | Description |
---|---|
Button | Displays a button in your application. |
Canvas | Enables you to draw shapes, such as lines, circles and rectangles. |
Check Button | Can be used to display a number of options as a checkboxes. The user is able to select multiple options at a time. |
Entry | Displays an input field for a single line of text. Allows a user to enter data. |
Frame | This is a container, and is where all other widgets will be organised. |
List Box | Provides a list of options to a user. |
tkinter
Module (3)tkinter
Widgets
iiWidget | Description |
---|---|
Menu | Provides a method to display various commands to the user. The commands themself are stored in a Menu Button. |
Menu Button | Used to create a menu in your application. |
Message | Displays an input field to display multi-line text. |
Radio Button | Displays a number of options to the user as a radio button. The user can only select one option at a time. |
tkinter
Module (4)tkinter
Widgets iiiWidget | Description |
---|---|
Scale | Used to display a slider to the user. |
Scrollbar | Provides scrolling capability to various widgets, i.e. list-boxes and messages. |
Text | Can be used for the user to insert multi-lines of text to the user. |
tkinter
Module (5)tkinter
Widgets
ivWidget | Description |
---|---|
Top Level | Used to provide a separate window container. |
Spin Box | Displays a fixed number of values to the user for selection. |
Paned Window | A container that may contain any number of panes that are arranged horizontally or vertically. |
Label Frame | A simple container that acts as a spacer or container for complex layouts. |
Message Box | Enables the developer to display messages to the user. |
tkinter
Module (6)tkinter
Module (7)Measurement Type | Example |
---|---|
Centimeter | "1c" |
Inch | "1i" |
Millimeter | "10mm" |
tkinter
Module (8)#rgb
four bits per colour,
i.e. #fff
is white#rrggbb
eight bits per colour,
i.e. #000000
is black#rrrgggbbb
twelve bits per colour,
i.e. #000fff000
is green'white'
, 'black'
,
'red'
, 'green'
tkinter
Module (9)# 0 # 1 # 2
('Helvetica', '16', 'bold underline')
Index | Definition |
---|---|
0 | Defines to the font family |
1 | Defines the font size |
2 | Defines to the formatting of the text |
tkinter
Module (10)tkFont
moduleFont
class
and a variety of options to change the formattingOption | Definition |
---|---|
family |
Defines the font family to be used as a string |
size |
Defines the font size |
weight |
bold for bold
formatting, normal for standard
formatting |
slant |
italic for
italic formatting, roman for standard
formatting |
underline |
1 for
underline formatting, 0 for no
underline |
overstrike |
1 for
overline formatting, 0 for no
over-strike |
import tkFont
font1 = tkFont.Font(family='Helvetica', size=16, weight='bold', underline=1)
tkinter
Module (11)tkinter
Module (12)borderwidth
optiontkinter
Module (13)Bitmap Value | Icon | Bitmap Value | Icon |
---|---|---|---|
error |
![]() |
gray75 |
![]() |
gray50 |
![]() |
gray25 |
![]() |
gray12 |
![]() |
hourglass |
![]() |
info |
![]() |
questhead |
![]() |
question |
![]() |
warning |
![]() |
.xbm
@
symbol@directory/file_name.xmb