Hi, When i try to show a empty grid, i don't have small cells like you. Do you call AutoSize between AddGrid and Show ? Autosize calc mimimum size of each cell for maximise cell display, but if you have empty cell, you have something like your second picture.
See attached sample. Laurent. ----- Original Message ----- From: <[EMAIL PROTECTED]> To: <perl-win32-gui-users@lists.sourceforge.net> Sent: Tuesday, July 08, 2003 10:01 PM Subject: [perl-win32-gui-users] displaying an empty Grid? > I wonder what the behaviour of the Win32::GUI::Grid > should be if you have created a grid and before you do > anything with it you just want to set it on $Grid->Show > This is what I have observe. WHen I launch my program > up, I have to connect to a database, ie. this picture. > http://www.geocities.com/corvette_2050/huh0.jpg > > Then after I have connected to the database, I can if I > want display it (data) on the grid by clicking on the > Refresh button as shown here in this photo. > > http://www.geocities.com/corvette_2050/huh1.jpg > > However if you look at the above photo, I had > intentionally wanted to display a fresh/empty Grid > prior to being filled with database info. However when > I invoked $Grid->Show before actually calling > SetCellText(...), this is what I see (above photo) > This grid is displayed but it is unproportional. Is > there something I am missing? > > $Grid = $W->AddGrid ( > -name => "Grid", > -pos => [70,80], > -size => [890,490], > -fixedrows => 1, > -fixedcolumns => 1, > -editable => 0, > ) or die "new Grid"; > $Grid->SetRows(58); > $Grid->SetColumns(20); > $Grid->Hide; > > Much later. > $Grid->Show; > > Then later on... after user click Refresh. > while(@DataRowFromDB = $sth->fetch ) { > foreach $fieldData (@DataRowFromDB) { > $Grid->SetCellText($rowcnt,$subitemcnt,$fieldData); > ... > } > } > > Thanks in advance
<<attachment: test8.zip>>