Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

fail setting frame height 1

Status
Not open for further replies.

MoshiachNow

IS-IT--Management
Feb 6, 2002
1,851
IL
HI,
In my code I'm trying to set 3 frames one under another in the $mw.
Whatever I do - seems that $frm2 does not accept any height settings,and the $tl (tiler) attached to $frm2 shows as 1 line height scrolled window,instead of beeing 50 pixels high,as expected.
what is wrong here ?
thanks

===================
my $mw = new MainWindow;
$mw->configure(-title=>"colorserver_update.exe Ver $VERSION on $computer, product =$product="); # Main Window
$mw->geometry('+50+10');

my $frm1=$mw->Frame(-height =>10)->pack(-side=>'top',-fill=>'x');
$frm1->Label(-text => 'Step 1: check for available updates',-anchor => 'nw')->pack(-side=>'top',-anchor => 'nw');
$text=" Name Size Description Status";
$frm1->Label(-background=>'white',-text => $text,-font=>[courier => 9],
-anchor=> 'w')->pack(qw/-side bottom -anchor w -fill x/);
$frm1->Label(-text => 'Step 2: install updates',-anchor => 'nw')->pack(-side=>'bottom',-anchor => 'nw');

my $frm2=$mw->Frame(-background=>'white',-height=>50)->pack(-side=>'top',-fill=>'x');

my(@pl) = qw/-side top -anchor w/;
my(@pl1) = qw/-side left -anchor w/;
$i=1;

print STDOUT "i=$i\n" if $debug;


#define the tiler
my $tl = $frm2->Scrolled('Tiler', -columns => 4, -rows => 30);
$tl->pack(qw/-side top -fill both/);
$tl->Manage();

my $frm3=$mw->Frame(-background=>'grey')->pack(-side=>'top',-fill=>'x');
my $txt = $frm3->Scrolled('Text',-font => 'courier 9', -background =>'grey',-relief => 'sunken',
-foreground =>'black', -borderwidth => 2,-setgrid => 'true',
-height =>30, -width=> 130, -scrollbars=> 'e');
$txt->tagConfigure('RED',-foreground => 'RED');
$txt->tagConfigure('BLUE',-foreground => 'blue');
$txt->tagConfigure('BLUEBOLD',-foreground => 'blue',-font => 'courier 10 bold');
$txt->tagConfigure('BOLD',-font => 'Arial 12 bold');
$txt->pack(qw/-expand YES -fill both/);

$txt->insert('0.0', "Running colorserver_upd.exe version $version1 on $computer , $TIME\n
If you want to install latest patches - press \"Install patches\" button.
If you want to install latest hotfixes - press \"Install hotfixes\" button.\n\n");
$txt->mark(qw/set insert 0.0/);

$Name[$i]=$tl->Checkbutton(-variable => \$toBeinstalledPatch->{$name},-background=>'white',
-text => $name,-width=> 30,-anchor=> 'w')->pack(qw/-anchor w/);
$Name[$i]->select() unless $debug;
$Size[$i]=$tl->Label(-background=>'white',-text => "$size",
-width =>6,-anchor=> 'w')->pack();
$Description[$i]=$tl->Label(-background=>'white',-text => "$description",
-width=> 34,-anchor=> 'w')->pack(qw/-anchor w/);
$INST[$i]=$tl->Label(-background=>'white',-text =>$status,
-width=> 4,-anchor=> 'w')->pack(qw/-anchor w/);

$tl->Manage($Name[$i],$Size[$i],$Description[$i],$INST[$i]);
$i++;


Long live king Moshiach !
 
The height of [tt]$frm2[/tt] is overridden when you call the [tt]Scrolled()[/tt] method on it with a [tt]-rows[/tt] parameter. Logicaly, this must set the height and this is, in fact, what happens, changing any previous setting.

Yours,

fish

["]As soon as we started programming, we found to our surprise that it wasn't as easy to get programs right as we had thought. Debugging had to be discovered. I can remember the exact instant when I realized that a large part of my life from then on was going to be spent in finding mistakes in my own programs.["]
--Maur
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top