Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

manipulating a buttons state

0 views
Skip to first unread message

Hans-Helmut Kohls

unread,
Sep 21, 2001, 2:52:11 AM9/21/01
to
Hi,

I have some buttons in an frame that I want to set 'disabled' any time
a special method is called.

Currently I am doing something like this:

sub changeButtons{
my $state = shift;
if ($state == 0){$state = 'disabled';}else{$state = 'normal'}

$Bausfuehren =
$Fbutton->Button(-text => 'Ausführen',
-state => $state,
-command => sub{doAction()}
);
drawButtons(); # this redraws all buttons
}

Instead of completely creating an new button I'd like to do something
like

$Bausfuehren->set(-state => $state); #this is what i'd like to do but
it doesnt work!

Is there any way of doing that?

thank you Hans

Rob Seegel

unread,
Sep 21, 2001, 3:31:47 AM9/21/01
to
>$Bausfuehren->set(-state => $state)

How about

$Bausfuehren->configure(-state => $state);

Rob

Slaven Rezic

unread,
Sep 21, 2001, 3:39:17 AM9/21/01
to
hhk...@gmx.de (Hans-Helmut Kohls) writes:

It's called configure:

$Bausfuehren->configure(-state => $state);

Regards,
Slaven

--
Slaven Rezic - slaven...@berlin.de
babybike - routeplanner for cyclists in Berlin
handheld (e.g. Compaq iPAQ with Linux) version of bbbike
http://bbbike.sourceforge.net

0 new messages