From: Bullock, Howard A. <HB<ullock@ty...> - 2001-05-09 17:24:50
Can some point to more documentation and/or sample scripts that display
multi-row and multi-column data than
http://jenda.krynicky.cz/perl/dbgrid.pl.txt as a sample; The grid does not
display for me. Instead I get small boxes with one or two characters in
each, 11 boxes per line.
I found Win32::GUI::GridLayout as part of the Win32::GUI package but can't
quite figure out what to do with it. The above script listed above is
supposed to provide a grid display using:
$LV->InsertColumn(-index => 0,-width => 150, -text => "Row#");
@Cols = $db->FieldNames();
$LV->InsertColumn(-index => $i, -width => 200, -text => $columname);
Where does Win32::GUI::GridLayout fit into he picture? Any sample or
additional links would be appreciated.
I've played with GridLayout a little. The way I understand it, it is to lay out controls on a window. Took me a while to figure out what was happening.
For instance: define a grid of 4 rows by 8 columns. Then put a button in the last row and last column (and noting else in that row): you'll get 8 columns all the width of that button - unless another row has a control that's wider, and then you'll get 8 columns all the width of *that* control. It seems to try to make all cells the same width and the same height: add anotehr control and everything rearranges itself. Combined with a Window (resizable) rather than a Dialog (fixed size), it can be pretty hard to get a reasonable layout.
Anyway, what happens is pretty clever - but I decided it was not what I was looking for. It's probably useful for things like tool windows, where you can be sure every cell (button) will be same size, but not for general window layout with labels, input controls and buttons, which all should take up different amounts of space (or at least width).
I haven't tried dbgrid - but I hope this helps a little anyway.
At 13:24 2001-05-09 -0400, Bullock, Howard A. wrote:
>I found Win32::GUI::GridLayout as part of the Win32::GUI package but can't
>quite figure out what to do with it.
>Where does Win32::GUI::GridLayout fit into he picture? Any sample or
>additional links would be appreciated.
>Perl-Win32-GUI-Users mailing list
HomeSite Help - http://hshelp.com/ - Extensions, Tips and Tools