Tkinter

tkinter

#tkinter

Sommario

Di

1

Capitolo 1: Iniziare con tkinter

2

Osservazioni

2

Differenze tra Python 2 e 3

2

Importazione in python 2.x

2

Importazione in python 3.x

2

Ulteriori letture

2

Versioni

3

Tcl

3

Pitone

3

Examples

4

Installazione o configurazione

4

Ciao mondo! (minimo)

5

Ciao mondo! (modulare, orientato agli oggetti)

6

Capitolo 2: Aggiunta di immagini a etichetta / pulsante

8

introduzione

8

Examples

8

Formati di file supportati da Tkinter

8

Utilizzo dei formati .GIF.

8

Capitolo 3: Finestre multiple (widget TopLevel)

Examples

Differenza tra Tk e Toplevel

organizzare la pila di finestre (il metodo .lift)

Capitolo 4: Il Tkinter Entry Widget

9

9

9

10

12

Sintassi

12

Parametri

12

Osservazioni

12

Examples

12

Creazione di un widget di voce e impostazione di un valore predefinito

12

Ottenere il valore di un widget Entry

12

Aggiunta di convalida a un widget di voce

13

Getting int From Entry Widget

13

Capitolo 5: Il widget Tkinter Radiobutton

15

Sintassi

15

Parametri

15

Osservazioni

15

Examples

16

Ecco un esempio di come attivare i pulsanti di opzione nelle caselle dei pulsanti:

16

Crea un gruppo di radiobutton

16

Capitolo 6: Personalizza gli stili TTK

17

introduzione

17

Examples

17

Personalizza una vista ad albero

17

Capitolo 7: Ritardare una funzione

19

Sintassi

19

Parametri

19

Osservazioni

19

Examples

19

.dopo()

19

Capitolo 8: Tkinter Geometry Managers

21

introduzione

21

Examples

21

pack ()

21

griglia()

22

posto()

23

Capitolo 9: Widget a scorrimento

26

introduzione

26

Sintassi

26

Parametri

26

Osservazioni

26

Examples

26

Collegamento di una barra di scorrimento verticale a un widget di testo

26

Scorrimento di un widget Canvas in senso orizzontale e verticale

27

Scorrimento di un gruppo di widget

27

Capitolo 10: Widget Ttk

28

introduzione

28

Sintassi

28

Parametri

28

Osservazioni

28

Examples

28

Treeview: esempio di base

28

Crea il widget

28

Definizione delle colonne

28

Definizione delle intestazioni

29

Inserisci alcune righe

29

Imballaggio

29

Barra di avanzamento

30

Funzione che aggiorna la barra di avanzamento

30

Imposta il valore massimo

30

Crea la barra di avanzamento

30

Valori iniziali e massimi

30

Emula progresso ogni 0,5 s

31

Titoli di coda

32

Di

You can share this PDF with anyone you feel could benefit from it, downloaded the latest version

from: tkinter

It is an unofficial and free tkinter ebook created for educational purposes. All the content is

extracted from Stack Overflow Documentation, which is written by many hardworking individuals at

Stack Overflow. It is neither affiliated with Stack Overflow nor official tkinter.

The content is released under Creative Commons BY-SA, and the list of contributors to each

chapter are provided in the credits section at the end of this book. Images may be copyright of

their respective owners unless otherwise specified. All trademarks and registered trademarks are

the property of their respective company owners.

Use the content presented in this book at your own risk; it is not guaranteed to be correct nor

accurate, please send your feedback and corrections to info@



1

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download