List Info

Thread: what's a ListCtrlCompare ?




what's a ListCtrlCompare ?
country flaguser name
United States
2007-10-17 17:54:52
Hello all,

The doc for Wx::ListCtrl#sort_items says the method takes
a ListCtrlCompare. I've searched high and low, and I can't
find any description of such an object.

Is there sample code somewhere in which an LC_REPORT style
ListCtrl offers sorting by column? That's really all I'm
trying to do, and if I could see it done I'm sure it would
all make sense to me.

Thanks much!

Peralta

_______________________________________________
wxruby-users mailing list
wxruby-usersrubyforge.org
ht
tp://rubyforge.org/mailman/listinfo/wxruby-users

Re: what's a ListCtrlCompare ?
country flaguser name
United Kingdom
2007-10-17 18:24:00
Hi

peraltasonic.net wrote:
> The doc for Wx::ListCtrl#sort_items says the method
takes
> a ListCtrlCompare. I've searched high and low, and I
can't
> find any description of such an object.
>   
I think we've missed the little bit of work this method
needs. I guess 
in Ruby it should accept a block which accepts two objects
and returns 
-1, 0 or 1 to represent the sort order of those items. This
is similar 
to how TreeCtrl#sort works.

But it won't work for now - will see if we can fix this for
the next release

thanks
alex

_______________________________________________
wxruby-users mailing list
wxruby-usersrubyforge.org
ht
tp://rubyforge.org/mailman/listinfo/wxruby-users

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )