Re: Re: Clist->set_reorderable
| From: | Ivan Rodriguez | Date: | Thu, 29 Jan 2004 09:36:36 +0000 |
| Subject: | Re: Re: Clist->set_reorderable | ||
| References: | 1 2 3 | Groups: | php.gtk.general |
| Request: | Send a blank email to php-gtk-general+get-4374@lists.php.net to get a copy of this message | ||
You have in the folder test/ the example gtk.php here you can view an
example of drag and drop, but i think this is imposible with columns :-(
----- Original Message -----
From: "nathan" <nathan@the-ring.homelinux.net>
To: <php-gtk-general@lists.php.net>
Sent: Thursday, January 29, 2004 9:57 AM
Subject: [PHP-GTK] Re: Clist->set_reorderable
> On 29 janv. 2004, you wrote in php.gtk.general:
>
> > nathan@the-ring.homelinux.net wrote:
> >> Hi,
> >> i'm trying to find how to enable reorderable columns in clist, i
> >> thought that set_reorderable will do the job, but it still doesn't
> >> work under linux or windows.
> >> Is someone know a way to do this?
> >
> > This does it for me.
> >
> > Attach this function to the click_column signal of the clist widget
> > you need to be able to sort. It works ascending and descending
> >
> > function column_clicked($clist, $column){
> > $current_sort_type = $clist->get_data('sort_type');
> > $current_sort_column = $clist->get_data('sort_column');
> > if ($current_sort_column == $column){
> > if ($current_sort_type==GTK_SORT_ASCENDING){
> > $sort_type = GTK_SORT_DESCENDING;
> > }
> > else {
> > $sort_type = GTK_SORT_ASCENDING;
> > }
> > }
> > else {
> > $sort_type = GTK_SORT_ASCENDING;
> > }
> > $clist->set_sort_column($column);
> > $clist->set_sort_type($sort_type);
> > $clist->sort();
> > $clist->set_data('sort_column', $column);
> > $clist->set_data('sort_type', $sort_type);
> > }
> >
> >
> > Rgards
> > Mike
>
> Thanks, but i've no sorting problem,
> what i want is to drag column 1 to column 3 for example.
> I'm perferctly ok with sorting data on a column asc or desc with a
> function similar to the one you've send, but still can't get my column
> moving :'(
>
> if somenone have an idea?
> regards nathan
>
> --
> PHP-GTK General Mailing List (http://gtk.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>