Re: Tk::DynaTabFrame (was "Re: Tk::CanvasRottext ?")
konovalo <[email protected]>
| Newsgroups | gmane.comp.lang.perl.tk |
|---|---|
| Message-ID | <[email protected]> |
>> I like what you've been doing with DynaTabFrame, but I wonder how
>> difficult it would be
>> to create a Notebook-type widget using one canvas for the side that
>> has the tabs on it, or
>> perhaps has an embedded Frame for switching out the "pages".
>>
>> It might be possible to emulate the blt Notebook, or come somewhat
>> close at least.
>> Just a thought.
>
I just want to note that BLT widgets, with all features, could be used
in Tcl::Tk after just one single line of declaring relationship to
Tcl/Tk, here is complete code example:
use strict;
use Tcl::Tk qw(:perlTk);
my $mw = tkinit;
# declare tabnotebook widgets rules to Tcl::Tk
$mw->Declare('BLTNoteBook','blt::tabnotebook',-require=>'BLT',-prefix=>'bltnbook');
# Create a tabnotebook widget.
my $tab = $mw->BLTNoteBook->pack(-fill=>'both');
# The notebook is initially empty. Insert tabs (pages) into the notebook.
for my $label (qw{ First Second Third Fourth }) {
$tab->insert('end', -text=>$label);
}
$tab->tabConfigure(0, -window=>$tab->Label(-text=>'text of label'));
$tab->configure(-tearoff=>'yes');
$tab->focus;
MainLoop;
__END__
besides, BLT allows non-horizontal text.
-++**==--++**==--++**==--++**==--++**==--++**==--++**==
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 [email protected]