hi ricardo --
In a message dated 1/5/2007 3:45:34 P.M. Eastern Standard Time,
[EMAIL PROTECTED] writes:
> hi I have some questions:
>
> [...]
>
> 3-I have a script in Perl/tk and there is a notebook tab, but I can't
> charge da background color:
>
> .......................................................................
>
> use Tk;
>
> my $mw = MainWindow -> new(-title => 'UPLA.', -bg =>'blue' ); # BG
function don't work
> $mw->maxsize(362,435);
> $mw->minsize(362,435);
> $pogtab = $mw->NoteBook(-background => 'black', -foreground => 'white',
-borderwidth => 2 , -inactivebackground => '#2415AE', -font => 'arial 9 bold',
-relief => 'suken')->pack(-expand=>1,-fill=>'both');
>
> $pogna1 = $pogtab->add('page1', -label=>'page1');
>
> $pogna2 = $pogtab->add('page2', -label => 'page2');
>
> MainLoop;
>
> [...]
>
> thanks for all! Ricardo.
the following may address some of your questions.
---------------------- code begins ---------------------------
use warnings; ### always use these
use strict; ### always use these
use Tk;
use Tk::NoteBook; # better to use this explicitly
my $mw = MainWindow -> new(-title => 'UPLA.', -bg =>'green',); # BG function
don't work
$mw->maxsize(362,435);
$mw->minsize(362,435);
my $pogtab = $mw->NoteBook(
-background => 'blue',
# -background => 'black', # black font invisible on top of this
color
# -foreground => 'yellow', # non-functional
-borderwidth => 2,
-inactivebackground => "#2415AE",
-font => 'arial 9 bold',
-relief => 'sunken',
)->pack(
-expand => 1,
-fill => 'both',
);
# still can't control color *behind* the tabs of notebook, but
# the notebook tabs and pages can be controlled.
# the add() method returns a Frame reference, and each Frame has its own
# individual and independent attributes. these attributes can be changed
# with the configure() method.
my $pogna1 = $pogtab->add('page1', -label =>'page1');
$pogna1->configure(-bg => 'blue');
my $pogna2 = $pogtab->add('page2', -label => 'page2')->configure(-bg =>
'green');
my $pogna3 = $pogtab->add('page3', -label => 'page3');
$pogtab->pageconfigure('page3', -label => 'xxx');
MainLoop;
---------------------- code ends ---------------------------
hth -- bill walters
_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs