Re: tackling the packer
- From: "R. T. Wurth" <rwurth@xxxxxxx>
- Date: Sat, 20 Aug 2005 01:08:36 GMT
"Gerald W. Lester" <Gerald.Lester@xxxxxxx> wrote in
UwsNe.6505$A33.5593@lakeread06:">news:UwsNe.6505$A33.5593@lakeread06:
> Melissa Schrumpf wrote:
>> Gerald W. Lester wrote:
>>
>>
[[discussion of geoemetry managers, pack vs. grid snipped]]
My favorite geo mgr is "it depends". Frequently I use combinations. The
project I work on has some standard decorations, namely a company
proprietary notice and a hint-text bar that go at the bottom of every
toplevel window. The routine that builds these for us always packs, so all
of our toplevels must be packed. When we need a grid, we pack a full-width
frame, and grid widets into that.
For example, one common pattern throughout our code is a "simple admin
detail screen", which typically creates or edits a database record. After
creating our standard decoration, we typically pack -side top a frame and
in this frame we grid rows comprising a fixed label and a setting widget,
which might be an entry, a tk_menu, or a button that invokes a modal
calendar dialog, for example. We use some combination of -sticky and -
anchor to get the labels right justified, so they *** up against the data
setting widget with suitable padding for separation. Then, below this, we
pack our action buttons, e. g. Clear, Update, Reset, Cancel, etc. in a row
across the bottom.
Another pattern we use a lot (a view-managed table) has a table at the top,
displayed in a packed (-side top) V&H scrolled listbox, a frame containing
a row of 3 (packed) buttons for invoking modal dialogs for controlling the
selection, formatting, and sorting of the database records displayed, and
then a application-specific area. Sometimes the application-specific area
is like a simple admin detail screen, a packed frame containing gridded
widgets, sometimes it's just a field of buttons for acting on selected
records.
Occasionally, I've even packed a row of buttons into a frame gridded to
span all columns in the last row of a grid.
My conclusion is that Tk is amazingly flexible, but one isn't really using
it's full potential unless one is equally familiar and comfortable with
both geo mgrs, and carefully considers which is better for the task at
hand, based on the characteristics of the problem at hand, and not on the
author simply choosing his/her favorite.
--
Rich Wurth / rwurth@xxxxxxx / Rumson, NJ USA
.
- Follow-Ups:
- Re: tackling the packer
- From: Gerald W. Lester
- Re: tackling the packer
- References:
- tackling the packer
- From: k:arel
- Re: tackling the packer
- From: Gerald W. Lester
- Re: tackling the packer
- From: Melissa Schrumpf
- Re: tackling the packer
- From: Gerald W. Lester
- tackling the packer
- Prev by Date: Re: Pofiling or timing in TCL
- Next by Date: Re: seeking tcltest help.
- Previous by thread: Re: tackling the packer
- Next by thread: Re: tackling the packer
- Index(es):