Testing this ( 8.6.11 - Win7 32 )**************************
package require Tk
set p [ttk::progressbar .progreso -orient horizontal -mode indeterminate]
set b [ttk::button .boton -text "Disable pb" -command "$p configure -state >disabled" ] pack $b $p -fill both -expand 1
$p start 5
i get this error
unknown option "-state"
unknown option "-state"
while executing
".progreso configure -state disabled" (...etc ... )
It seems like progressbar can't be disabled (however the documentation >doesn't mention this ). Isn't possible set the state of this widget ?
Alejandro
On Mon, 15 Jan 2024 16:37:38 -0800 (PST), [email protected] wrote:
Testing this ( 8.6.11 - Win7 32 )**************************
package require Tk
set p [ttk::progressbar .progreso -orient horizontal -mode indeterminate] >>set b [ttk::button .boton -text "Disable pb" -command "$p configure -state >>disabled" ] pack $b $p -fill both -expand 1
$p start 5
i get this error
unknown option "-state"
unknown option "-state"
while executing
".progreso configure -state disabled" (...etc ... )
It seems like progressbar can't be disabled (however the documentation >>doesn't mention this ). Isn't possible set the state of this widget ?
Alejandro
Maybe this is what you want?
set p [ttk::progressbar .progreso -orient horizontal -mode indeterminate]
set b [ttk::button .boton -text "Disable pb" -command "$p stop" ]
pack $b $p -fill both -expand 1
$p start 5
Hi Luc,**************************
actually i want to disabled it, not stop it.
Using your example, i got first
and after click in the buttonstate is
state now is !disabled
by the way, the progressbar remains enabled all time.
Saludos,
Alejandro
What do you mean by "disabled"?
I don't know what a disabled progress bar is
Well, is like a disabled button ... but with progressbar.
May be this is a silly question but jokes aside, is still valid.
Saludos,
Alejandro
El martes, 16 de enero de 2024 a la(s) 11:44:28 p.m. UTC-3, Rich escribió:
Buttons are active items that accept user interaction (click on
button). "Disablement" for a button makes sense as it prevents
"activation" of the button until it is later enabled.
Ok, but what about labels then ?.
You can to configure the state of labels to "disabled" or "readonly", for example.
How the user interact with a label ?
Odd?. May be. But you can disable a label if you want ...
[email protected] <[email protected]> wrote:
What do you mean by "disabled"?
I don't know what a disabled progress bar is
Well, is like a disabled button ... but with progressbar.
May be this is a silly question but jokes aside, is still valid.
Saludos,
Alejandro
Except that "disabled" is an odd state to reason about for a "progress
bar".
Buttons are active items that accept user interaction (click on button).
"Disablement" for a button makes sense as it prevents "activation" of
the button until it is later enabled.
A progress bar (at least a normal one) is a "one-way" widget. It
conveys information to a user, but there is usually no "interaction"
from the user (no clicking on the bar to do something). Therefore, with
no "interaction", there is nothing to "disable", and setting it to
"disabled" is an odd state to ask about.
Disabled progress bars are sometimes used if a task has finished or is >suspended. They should be shown differently to non-disabled progress bars.
Sometimes, progress bars are overlaid with an invisible slider widget. (I >don't recommend this, it's hard to get right.) Disabled would mean
disabling that invisible slider, in that case.
| Sysop: | Keyop |
|---|---|
| Location: | Huddersfield, West Yorkshire, UK |
| Users: | 715 |
| Nodes: | 16 (2 / 14) |
| Uptime: | 18:35:02 |
| Calls: | 12,103 |
| Calls today: | 3 |
| Files: | 15,004 |
| Messages: | 6,518,083 |