Advertisement

07.11.2008 at 07:12AM PDT, ID: 23557254
[x]
Attachment Details

list box operations

Asked by Purna2010 in Perl Programming Language, Programming Languages

Tags: Perl

Swapping elements from one list box to other list box. I have a code like this.


$lab2 = $frm_name -> Label(-text=>"Selected Files: ",-foreground=>'black',-font => ['Times New Roman', '14'])->place( -x =>260, -y => 100);
my $lst2 = $frm_name->Scrolled('Listbox',-font => ['Times New Roman', '10'],-height=>'8',-scrollbars => 'se',-selectmode => 'single',
                                          -width=>'25')->place( -x => 260, -y =>120);
$lab = $frm_name -> Label(-text=>"Files List: ",-foreground=>'black',-font => ['Times New Roman', '14'])->place( -x =>30, -y => 100);
my $lst = $frm_name->Scrolled('Listbox',-font => ['Times New Roman', '10'],-height=>'8',-scrollbars => 'se',-selectmode => 'single',
                                          -width=>'25')->place( -x => 30, -y =>120);

@array = &Code_Changes();

$lst -> insert('end',@array);
$lst->bind('<Double-1>', \&give_color);
$lst->bind('<Triple-1>', \&remove_color);
sub give_color
{
      $lst->itemconfigure('active',-foreground => 'red');
      $lst->selectionClear('active');  
}
sub remove_color
{
      $lst->itemconfigure('active',-foreground => 'black');
}
$but5 = $frm_name -> Button(-text=>">",-font => ['Times New Roman', '14'],


 sub display
{
      my @selected;
      my $index;

      for($index=0,$i=0;$index<$lst->size;$index++)
      {
            $color2 = $lst->itemcget($index,-foreground);
            if($color2 eq 'red')
            {
                  @selected[$i] = trim($lst->get($index));
                  $i++;
            }
      }
      $lst2 -> insert('end',@selected);

}

                       -command => \&display)->place( -x =>217, -y =>140);
Start Free Trial
[+][-]07.11.2008 at 11:54PM PDT, ID: 21987962

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.12.2008 at 11:08AM PDT, ID: 21989926

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.12.2008 at 11:10AM PDT, ID: 21989931

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.13.2008 at 02:58AM PDT, ID: 21991848

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.13.2008 at 10:37PM PDT, ID: 21995895

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.14.2008 at 02:56AM PDT, ID: 21996769

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.14.2008 at 05:20AM PDT, ID: 21997353

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.14.2008 at 12:29PM PDT, ID: 22001216

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.14.2008 at 12:32PM PDT, ID: 22001245

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.14.2008 at 12:39PM PDT, ID: 22001326

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.15.2008 at 09:26PM PDT, ID: 22013276

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.15.2008 at 09:33PM PDT, ID: 22013294

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.16.2008 at 01:18AM PDT, ID: 22014093

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.16.2008 at 01:56AM PDT, ID: 22014257

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.16.2008 at 10:10AM PDT, ID: 22017980

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Perl Programming Language, Programming Languages
Tags: Perl
Sign Up Now!
Solution Provided By: FishMonger
Participating Experts: 1
Solution Grade: A
 
 
[+][-]07.16.2008 at 10:13PM PDT, ID: 22022494

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628