vikee has asked for the wisdom of the Perl Monks concerning the following question:

Hello, i'm using this widget. the program is ok, works 
without errors, but now i can't select anything from it. I 
select something and remains the same as it was initialized.

any ideas why?
$Rowframes[ $numberofrows - 1 ]->BrowseEntry( -variable => $data[ $numberofrows - 1 ][$i], -choices => @column_params[$i], -state => 'readonly', -width => 16, )->pack( side => 'left');

Replies are listed 'Best First'.
Re: Tk: browseentry
by bgreenlee (Friar) on Jul 22, 2004 at 14:33 UTC

    Not knowing the first thing about Tk::BrowseEntry other than what I just pulled up on the ActivePerl site, it seems that you need to be passing a scalar reference for your -variable parameter, and an array reference for the -choices parameter. Assuming that $column_params[$i] is actually an array reference:

    $Rowframes[ $numberofrows - 1 ]->BrowseEntry( -variable => \$data[ $numberofrows - 1 ][$i], -choices => $column_params[$i], -state => 'readonly', -width => 16, )->pack( side => 'left');

    Brad

Re: Tk: browseentry
by zentara (Cardinal) on Jul 22, 2004 at 18:15 UTC
    You really need to post working (or non-working snippets) so we can run it. Otherwise we just have to guess. From looking at your code, I would suspect the "-state=>readonly"

    I'm not really a human, but I play one on earth. flash japh
      You're right, i should send the whole code...
      the problem was with the -variable, there is an array needed
      so @column_params[$i], it's a 2D array.

      thanks