Hi all, I've been trying to mimic a Java toggle button in TK but every
time i use my own implementation I have to press the button three
times before it becomes sunken.
Heres a quick overview of the button presses:
Starts off raised.
Press once - should be sunken but stays raised
press again - stays raised but it should be at this point
press again - the button goes sunken
and from here on in the button acts like i want it to, its just the
first time i use it.
Here's the code im using if anyone can help me:
if {$phaseInverterActive == "true"} {
set phaseInverterActive "false"
.phaseInverterButton conf -relief raised
} else {
set phaseInverterActive "true"
.phaseInverterButton conf -relief sunken
}
thanks in advance,
Flamingo11