Re: table layout

* Scott Lanning <lannings who int> [2005-07-19 17:41]:
Basically I want a simple form and to be able to control the
width of the text entries according to how many columns they

|        |        |        |        |        |
  Name:  [_________________]
  Year:  [________]
  Addr:  [__________________________]

But what I get is either this if I don't use 'expand'

  Name: [_______]
  Year: [_______]
  Addr: [_______]

or this if I use 'expand':

  Name: [______________________________________________]
  Year: [______________________________________________]
  Addr: [______________________________________________]

What am I doing wrong?

Columns 2 and 3 have nothing that would force any width. You are
saying that column 2 or 3 may be as wide as widgets require, but
at the same time, widgets may be as wide as column 2 or 3
requires. Well, that gets you a width of 0 for columns 2 and 3.

You must force either the columns or the widgets to occupy a
particular width, so that either the widgets or the columns,
respectively, can have their width calculated based on the
respective other constraint.

You, uh, basically need spacer GIFs. If youâll excuse the HTML
table layout era terminology. Stick invisible dummy widgets with
1px height and a well-defined width into columns 2 and 3 on a row
that doesnât contain anything else.

Heh, I didnât think Iâd ever use that trick again.

*AUTOLOAD=*_=sub{s/(.*)::(.*)/print$2,(",$\/"," ")[defined wantarray]/e;$1};

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]