[prev in list] [next in list] [prev in thread] [next in thread]
List: php-gtk-general
Subject: [PHP-GTK] R: [PHP-GTK] Re: clist sorting
From: "Dimitri Giardina" <dimitri () cdinformatica ! it>
Date: 2003-08-25 7:20:27
[Download RAW message or body]
The function applies the "natural" order to the items.
You should use this list: 01 02 03 04 05 06 07 08 09 10, ... zero filled
(sprintf).
01 < 10 but
1 < 10 < 2
bye
Dimitri Giardina
System Administrator & Internet Programmer
CD Informatica Srl.
Chieti Scalo (CH) [ ITALY ]
> -----Messaggio originale-----
> Da: Aaron [mailto:aragorn@gamer.net.nz]
> Inviato: giovedi 7 agosto 2003 14.36
> A: php-gtk-general@lists.php.net
> Oggetto: [PHP-GTK] Re: clist sorting
>
>
> The method "set_compare_func" allows you to write the comparison
> function. Andrei said he was planning on adding it sometime, I don't
> know if it will be before GTK 2 is implemented though :/
>
> Tony Leake wrote:
> > When I sort a clist using the following code:
> >
> > $clist->set_sort_type(GTK_SORT_DESCENDING);
> > $clist->set_sort_column($column);
> >
> > $clist->sort();
> >
> > it sorts a list of integers (0-10) as follows
> > 9
> > 8
> > 7
> > 6
> > 5
> > 4
> > 3
> > 2
> > 10
> > 1
> > 0
> >
> > I guess it thinks they're strings, how can I fix this
> >
> > thanks
> > Tony
> >
>
>
> --
> 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
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic