For Programmers: Free Programming Magazines  


Home > Archive > PerlTk > August 2004 > RE: Tabbed frame questions









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author RE: Tabbed frame questions
Dean Arnold

2004-08-27, 8:56 pm

> I am using Tabbed Frames successfully but I have two questions.
>
> Can you 'raise' a particular tabbed frame, via a Perl/Tk call, so that
> it is at the 'front'?
>
> Is it possible to 'grey' a tab out (via a Perl/Tk call) so that the tab
> cannot be selected?
>
> Best regards
>
> Henry Merryweather


Which tabbed frame are you using ? Tk::TabFrame, Tk::DynaTabFrame, or
Tk::Notebook ?

Tk::DynaTabFrame has a raise() method; can't recall if TabFrame
does; I think Notebook does as well.

Tk::DynaTabFrame doesn't directly support disabling a tab, but
by using the $frame->cget('-tabs') method, you can
get a hashref of the tab button widgets the tabs use to
handle the "click", and enable/disable them yourself:
(NOTE: I've never tried this, but it should work...)

my $tabs = $tabframe->cget(-tabs);
$tabs->{"MyDisabledTab"}->configure(-state => 'disabled');

I don't think TabFrame supports that, and can't recall if Notebook
has a disable mechanism.

HTH,
Dean Arnold
Presicient Corp.



-++**==--++**==--++**==--++**==--++**==--++**==--++**==
This message was posted through the Stanford campus mailing list
server. If you wish to unsubscribe from this mailing list, send the
message body of "unsubscribe ptk" to majordomo@lists.stanford.edu
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com