Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - The Difference between intvar () and stringvar () in python
The Difference between intvar () and stringvar () in python
First, the roles are different

1, intvar (): an object under tkinter. Used to process integers.

2.Stringvar (): Stringvar is not a built-in object in python, but an object under Tkinter.

Second, the value changes are different.

1, intvar (): There is no need to track the change of the value of the variable.

2.stringvar (): You need to track the change of the value of the variable to ensure that the change of the value can be displayed on the interface at any time.

Third, the characteristics are different.

1, intvar (): When the intvar type calls the get function, the variable is first converted into data of tuple type.

2.Stringvar (): When the set function is called by Stringvar type, the variable is first converted into tuple type data. In fact, data of tuple type is used directly before calling the set function.

Baidu encyclopedia -Tkinter

Baidu encyclopedia -Python