Posted on 2005-02-09 13:50:07-08 by crwearn
Tk-ToolBar v0.09 option -in
Hi, New to Tk but not Perl (have moved from Win32::GUI) Have created two toolbars and am attempting to set the second one to start (embed) in the first using the -in option, however whatever value I try to use as 'a valid Tk-ToolBar object' it does not recognise it.
my $tbMain = $winMain->ToolBar(qw/-moveable 1 -side top -indicatorcolor blue/); $tbMain->ToolButton etc... my $tbMain2 = $winMain->ToolBar(qw/-side top -in ??valid Tk-ToolBar object??/);
what (or should I say how) do I enter the 'valid Tk-ToolBar object'
Thanks in advance
Chris
Direct Responses: 78 | Write a response
Posted on 2005-02-10 06:01:03-08 by aqumsieh in response to 75
Re: Tk-ToolBar v0.09 option -in
Hi,

The reason for your problems is that you are using qw// which does not interpolate.
So basically qw/$var/ is a list of one element, that element being the string '$var'.
To fix it, you can do this:

my $tbMain2 = $winMain->ToolBar(-side => 'top', -in => $tbMain, );

One more thing: you misspelled 'movable' :)
--Ala
Direct Responses: 147 | Write a response
Posted on 2005-02-24 03:00:33-08 by crwearn in response to 78
Re: Tk-ToolBar v0.09 option -in
Hi Ala, Of course... I completely forgot about the qw//. Thank you, working fine now. Chris
Direct Responses: Write a response
Perl Weekly newsletter
A free weekly newsletter for people who are busy to read all the blogs. click here to check it out.