Thanks for that

ive setup the bind to the header and then sorted the array as is, this enables me to also determine the type of sort to do on each column.

code

#bind to the header column, to enable sorting and also so we can distr +oy the thread $grid->bindColumns('<Button-1>' => sub { my ($w, $infoHR) = @_; my $column = $infoHR->{-column}; #change the queue status to HOLD while any user interaction is + occuring &button_setup('HOLD','Red'); #kill current processing thread print "Thread destroyed\n"; $thr->cancel(); my @entirelist = $grid->get(0,"end"); $grid->delete(0,"end"); #sort selected column if($column =~/0|2/){ @entirelist = sort {$a->[$column] <=> $b->[$column]} @enti +relist; }else{ @entirelist = sort {lc$a->[$column] cmp lc$b->[$column]} @ +entirelist; }; &populate_grid($grid,scalar @goods_issues_headers-1,\@entireli +st); });
all I need to do now is add in reverse and its away and running.

thanks skywalker

In reply to Re^2: Mlistbox Sort by skywalker
in thread Mlistbox Sort by skywalker

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.