Home > Archive > PerlTk > August 2004 > Reusing a LabFrame across multiple notebook tabs.
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 |
Reusing a LabFrame across multiple notebook tabs.
|
|
|
| Well, I have a number of tabs in the main window and each tab should
contain the labframe below. It seems obvious to me that I should only
have to write the code once and reuse it, but I have not been able to
figure it out. As it stands now, I have to add the LabFrame to tab1,
tab2, tab3 and so on.
Who has got the better way?
thanks,
ben
################## Begin new script block
#####################################
$labFrame3 = $tab3 -> LabFrame(
-label => 'Run and save options',
-labelside => 'acrosstop')
-> place(-x => 0, -y => 386, -width => 597, -height => 57);
$labFrame3 -> Checkbutton(
-variable => \$recursive,
-text => 'Recursion on subdirectories?')
-> place(-x => 20, -y => 0);
$cbsave = $labFrame3 -> Checkbutton(
-variable => \$savescript,
-text => 'Save to library?')
-> place(-x => 200, -y => 0);
$cbsave -> select();
# Only visible if the "save" option is selected.
$label = $labFrame3 -> Label(
-text => 'Enter a name:' )
-> place(-x => 315, -y => 1);
# Only visible if the "save" option is selected.
$labFrame3 -> Entry(
-textvariable => \$newscriptname)
-> place(-x => 390, -y => 3);
$labFrame3 -> Button(
-command => \&runNew,
-image => $saveicon )
-> place(-x => 520, -y => 0);
################### End new script block
######################################
| |
| Ala Qumsieh 2004-07-31, 3:55 am |
| ben wrote:
> Well, I have a number of tabs in the main window and each tab should
> contain the labframe below. It seems obvious to me that I should only
> have to write the code once and reuse it, but I have not been able to
> figure it out. As it stands now, I have to add the LabFrame to tab1,
> tab2, tab3 and so on.
>
> Who has got the better way?
The obvious question is "Why do you want the labframe inside the
notebook in the first place?" Why not simply have it all by itself above
or below the notebook since it will always be visible anyway?
--Ala
| |
|
| You are correct. I realized that was the solution this w end.
However, the reason I went down that path in the first place is
because I hadn't figured out how to start the tab lower in the main
window or have them end sooner. I can't seem to manipulate notebook
tab locations, so I'm adding them to a frame and manipulating that.
thanks,
ben
Ala Qumsieh <notvalid@email.com> wrote in message news:<2YDOc.4784$AY5.4468@newssvr21.news.prodigy.com>...
> ben wrote:
>
> The obvious question is "Why do you want the labframe inside the
> notebook in the first place?" Why not simply have it all by itself above
> or below the notebook since it will always be visible anyway?
>
> --Ala
|
|
|
|
|