Text in widget/text:7
The generic text widget.
A text is meant to be contained inside a window tag. The user can edit the content of the text area which can be on one or several lines, cleared or masked like a password.
This is a generic widget which will be converted into a specific widget, depending on the used GUI toolkit.
Class summary
This class offers 4 properties.
Property | Get | Set |
---|---|---|
cursor | Return the text Cursor object. | Can’t write |
disabled | Return whether the text is disabled or not. | Can’t write |
enabled | Return whether the text is enabled or not. | Can’t write |
hidden | Return whether the text is hidden or not. | Can’t write |
This class offers 5 methods.
Method | Signature | Description |
---|---|---|
create_specific | create_specific() |
Create the specific widget, using the specific_package attribute. |
disable | disable() |
Disable the text. |
enable | enable() |
Force-enable the text. |
schedule | schedule(coroutine) |
Schedule the specified coroutine in the main event loop. |
sleep | sleep(seconds) |
Asynchronous sleep during the specified number of seconds. |
Properties
cursor
This property can only get (read-only).
Get
Return the text Cursor object.
disabled
This property can only get (read-only).
Get
Return whether the text is disabled or not.
enabled
This property can only get (read-only).
Get
Return whether the text is enabled or not.
hidden
This property can only get (read-only).
Get
Return whether the text is hidden or not.
Methods
create_specific
create_specific(self)
Parameter | Type | Default |
---|---|---|
self | Text |
Create the specific widget, using the specific_package
attribute.
If the specific object has already been created, don’t recreate it and raise no exception.
disable
disable(self)
Parameter | Type | Default |
---|---|---|
self | Text |
Disable the text.
enable
enable(self)
Parameter | Type | Default |
---|---|---|
self | Text |
Force-enable the text.
schedule
schedule(self, coroutine)
Parameter | Type | Default |
---|---|---|
self | Text |
|
coroutine | Not set |
Schedule the specified coroutine in the main event loop.
sleep
sleep(self, seconds)
Parameter | Type | Default |
---|---|---|
self | Text |
|
seconds | Not set |
Asynchronous sleep during the specified number of seconds.
This method should ONLY be called in an asynchronous control method.
It is a shortcut to asyncio.sleep
.
Args: seconds (int or float): the number of seconds to wait.