RE: [PHP-GTK] Populating a clist
| From: | Edward A. McLain | Date: | Mon, 12 Mar 2001 14:59:42 +0000 |
| Subject: | RE: [PHP-GTK] Populating a clist | ||
| Groups: | php.gtk | ||
| Request: | Send a blank email to php-gtk+get-701@lists.php.net to get a copy of this message | ||
Try it like this, it is what works for me..
$clist = &new GtkClist(3);
$clist->set_column_title(0, "Position");
$clist->set_column_title(1, "Dunno");
$clist->set_column_title(2, "File Name");
$clist->column_titles_show();
$clist->column_titles_active();
$clist->freeze();
if ($dir = @opendir("c:\mp3")) {
while($file = readdir($dir)) {
$add[0]=$pos;
$add[1]=0;
$add[2]=$file;
$clist->append($add);
}
closedir($dir);
}
$clist->thaw();
Don't know if that is what you are looking for or not..
Later,
Ed McLain
-----Original Message-----
From: Paul Skinner [mailto:paulskin@icon.co.za]
Sent: Monday, March 12, 2001 5:22 AM
To: php-gtk@lists.php.net
Subject: [PHP-GTK] Populating a clist
Hi,
$clist1 = &new gtkclist(3);
$clist1->set_auto_sort(true);
if ($dir = @opendir("c:\mp3")) {
while($file = readdir($dir)) {
$clist1->insert_row;
$clist1->set_text($pos,0,$file);
}
closedir($dir);
}
I am *very* new to php-gtk...only started last night. If someone could
point out
my obvious mistake it would be much appreciated...
-Paul Skinner
-----------------------------------------
Owner, Computer 2000cc
"And theres those that go..
and theres those that stay..
and you walk out on the edge of the
world and you balance yourself there
for a while and you figure out which
one your gonna be...
and alot of our friends are doing
other things right now.. and were
standing up on this stage.. "