Re: mixing pack() and Tk::grid



On Jun 14, 9:38 am, Ulli Horlacher <frams...@xxxxxxxxxxxxxxxxxxxx>
wrote:
I thought, one can mix the placers pack() and Tk::grid, but it fails for
me.

I need some kind of a 2 x 2 table (with explanations) on top, and a
editable text area beneath.

I tried it with:

  $A->title('address book');

  $label = $A->Label(-text => "Address book format:");
  Tk::grid($label, -row => 0, -column => 0);

  $label = $A->Label(-text => "ALIAS E-MAIL-ADDRESS");
  Tk::grid($label, -row => 0, -column => 1);

  $label = $A->Label(-text => "Example:");
  Tk::grid($label, -row => 1, -column => 0);

  $label = $A->Label(-text => "framstag framstag\@rus.uni-stuttgart..de", -relief => 'sunken');
  Tk::grid($label, -row => 1, -column => 1);

  $A->gridRowconfigure(1, -weight => 1);

  $t = $A->Scrolled('Text',qw(-relief sunken -height 30));
  $t->pack(qw(-expand yes -fill both));

Result is a window without content.
Without the last line, the 2 x 2 table is shown correctly.

--
Ullrich Horlacher              Informationssysteme und Serverbetrieb
Rechenzentrum                  E-Mail: horlac...@xxxxxxxxxxxxxxxxxxxx
Universitaet Stuttgart         Tel:    ++49-711-685-65868
Allmandring 30                 Fax:    ++49-711-682357
70550 Stuttgart (Germany)      WWW:    http://www.rus.uni-stuttgart.de/

Such mix of geometry managers is impossible;
You can apply "grid" with "columnspan":

Tk::grid($t, -row => 2, -column => 0, -columnspan => 2);

.



Relevant Pages

  • Re: WARNING - XP Service Pack 2 - DO NOT INSTALL
    ... My Suggestion is to take your computer, open the window, and chuck the ... my Norton Internet Security and AntiVirus WERE ... > other Windows downloads, because your instructions are ... > Sure, there are links to explanations, which then link ...
    (microsoft.public.windowsxp.general)
  • RE: WARNING - XP Service Pack 2 - DO NOT INSTALL
    ... My Suggestion is to take your computer, open the window, and chuck the ... my Norton Internet Security and AntiVirus WERE ... > other Windows downloads, because your instructions are ... > Sure, there are links to explanations, which then link ...
    (microsoft.public.windowsxp.general)
  • Re: tk_dialog crashes wish
    ... toplevel window first, then give its path as a first argument of tk_dialog. ... Thanx for explanations. ... Regards, ...
    (comp.lang.tcl)