Re: Clist - Not acting as it ought to
| From: | Andrei Zmievski | Date: | Tue, 20 Mar 2001 20:29:29 +0000 |
| Subject: | Re: Clist - Not acting as it ought to | ||
| References: | 1 | Groups: | php.gtk |
| Request: | Send a blank email to php-gtk+get-1015@lists.php.net to get a copy of this message | ||
On Wed, 21 Mar 2001, Martin Cameron wrote:
> Here's the array that is not acting as it should:
>
>
> $titles=array("Name","Amount","Date");
> $list=& new GtkClist(3,$titles);
> while($row=mysql_fetch_array($res)){
>
> $l=($row["username"].",".$row["amount"].",".$row["date"]."
> \n");
> print $l;
> $labeltext[] .= $l;
> }
> $list->freeze();
> $list->append($labeltext);
> $list->thaw();
$labeltext should be an array of strings for each column, i.e.:
while(..) {
$labeltext[] = ...;
$list->append(labeltext);
unset($labeltext);
}
-Andrei
"In this age, which believes that there is a short cut to everything,
the greatest lesson to be learned is that the most difficult way is, in
the long run, the easiest."
-Henry Miller, The Books in My Life