[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: Gtk2::Table widget alignment
- From: Gavin Brown <gavin brown uk com>
- To: muppet <scott asofyet org>
- Cc: gtk-perl-list gnome org
- Subject: Re: Gtk2::Table widget alignment
- Date: 15 Aug 2003 15:07:34 +0100
> in such situations i've made a habit of rearranging things so that i can
> vectorize the creation of the table rows. this has the added benefit of
> decoulpling things so that you can rearrange and replace them quite easily.
> perl is great for this sort of thing.
>
> # declare the row relationships as data rather than code
> @rows = (
> { label => 'foo', type => 'entry', var => \$foo_val }
> { label => 'bar', type => 'bool', var => \$bar_val }
> { label => 'baz', type => 'entry', var => \$baz_val }
> );
> foreach my $r (@rows) {
> # write the logic to create a row once
> # with different cases for different row types
> }
I always thought there was was a space for a module that might be called
Gtk2::Form, that basically did all that stuff for you. Would probably
make the creation of preferences dialogs a *lot* easier.
Just one of the many things I've never got round to doing :-/
Gavin.
--
Gavin Brown
e: gavin brown uk com
w: http://jodrell.net/
PGP/GPG key ID: 891D8FCA
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]