Re: Editable tables and general planning help

From: Date: Thu, 07 Jul 2005 16:27:41 +0000
Subject: Re: Editable tables and general planning help
References: 1 2 3 4 5 6  Groups: php.gtk.general 
Request: Send a blank email to php-gtk-general+get-5926@lists.php.net to get a copy of this message
Jake - Sorry, but I haven't been following this one in detail, so hopefully this isn't a replay... it looks to me like you're trying to build a GtkClist using GtkTable... why not just use GtkClist?? I've built a whole app using it and have a lot less problem with response. No crashes so far. Madeleine D. At 10:35 AM 7/7/05 +0100, Jake Gordon wrote: >Hi again, > >I tried GtkSheet but for some reason it doesn't display column and row >headings until you go into a cell on the row/column. It seems a bit >buggy. Also, it seems stuck at a fixed size so if there are too many >rows or columns it can't display them all. > >Instead for now I've created a grid with GtkTable and GtkEntry and the >functionality seems fine for what I need. However, my desired grid size >is 22 columns and 100 rows. The program has great difficulty doing this >- taking about 30 seconds to load, and then often crashing, possibly due >to PHP max execution settings or something. Either way, not desirable. >If its possible to get this table to load in a second or two then I'm >set... if not then I think I'll have to stop playing with PHP-GTK and >just go back to a web based interface. > >Here's my code for the grid. Perhaps someone can suggest a way to do >this without having the application take ages and/or crash?: > >--- >$table = &new GtkTable(); >$vbox->add($table); >$table->set_row_spacings(0); >$table->set_col_spacings(0); > >$rows = 1000; >$cols = 22; > >// Do $rows rows >for($row=1;$row<=$rows;$row++) { > // Do $cols columns > for($col=1;$col<=$cols;$col++) { > ${'text_'.$col.'_'.$row} = &new GtkEntry(); > ${'text_'.$col.'_'.$row}->set_text($row.".".$col); > ${'text_'.$col.'_'.$row}->set_usize(40, -1); > $table->attach(${'text_'.$col.'_'.$row}, $col, $col+1, $row, >$row+1, GTK_SHRINK, GTK_SHRINK); > } >} > >$table->show_all(); >--- > > >Also, PHP seems not to release memory when I $widget->destroy(). Should >it do? Or is there a different suggested way to release memory? e.g. I >have five 'pages' in my application. When I go to one page the widget >for the page that was showing before is destroyed. However, the memory >it used doesn't seem to be release. > >Jake. > >Ivan Rodriguez wrote: >> PHP-GTK 1.0.1 version has all widgets, GtkSheet GtkPlot and other, the >> GtkExtra widgets and GtkScintilla and others too >> >> On 7/7/05, Jake Gordon <php-gtk@jakeg.co.uk> wrote: >> >>>Ivan Rodriguez wrote: >>> >>>>I recommend you to see the widget GtkSheet is all what you need. >>> >>>This seems to be an 'extra' which is no longer maintained. Where can I >>>get it from? I'm on Windows. Apparently I need a .dll as well. >>> >>>Jake. >>> >>>-- >>>PHP-GTK General Mailing List (http://gtk.php.net/) >>>To unsubscribe, visit: http://www.php.net/unsub.php >>> >>> >> >> > >-- >PHP-GTK General Mailing List (http://gtk.php.net/) >To unsubscribe, visit: http://www.php.net/unsub.php > >

« previous php.gtk.general (#5926) next »