scrolled list of Entry 
Author Message
 scrolled list of Entry

Hi, all--

I'm writing a program generator and would like to bring up a scrollable
list of Entry widgets.  Actually, even better would be a scrollable list
consisting of Label and Entries side-by-side, so that the user would be
able to edit only part of the text, thus:

                ---------------------------
               | ABSERR(1) = | <Entry> |
               ----------------------------
               | ABSERR(2) = | <Entry> |
               ----------------------------
                                .
                                .
                                .

The user would be able to edit only the part marked <Entry>.  I'm new at
this, and my first attempts have failed miserably.  Any hints?

Thanks in advance,

Steve Corwin



Fri, 27 Jun 2003 07:32:49 GMT  
 scrolled list of Entry

Quote:
> Hi, all--

> I'm writing a program generator and would like to bring up a scrollable
> list of Entry widgets.  Actually, even better would be a scrollable list
> consisting of Label and Entries side-by-side, so that the user would be
> able to edit only part of the text, thus:

>                 ---------------------------
>                | ABSERR(1) = | <Entry> |
>                ----------------------------
>                | ABSERR(2) = | <Entry> |
>                ----------------------------
>                                 .

This should get you going:

        use strict;
        use Tk;
        use Tk::Pane;

        my $mw = tkinit;
        my $f = $mw->Scrolled('Pane', -scrollbars => 'oe')->pack;
        for (my $I = 0; $I < 10; $I++) {
            $f->Label(-text => "Label $I")->grid(-row => $I, -col => 0);
            $f->Entry->grid(-row => $I, -col => 1);
        }
        MainLoop;

--
Marc Dashevsky  (remove "_" from address to reply by e-mail)



Fri, 27 Jun 2003 08:02:43 GMT  
 scrolled list of Entry

Quote:


>> Hi, all--

>> I'm writing a program generator and would like to bring up a scrollable
>> list of Entry widgets.  Actually, even better would be a scrollable list
>> consisting of Label and Entries side-by-side, so that the user would be
>> able to edit only part of the text, thus:

>>                 ---------------------------
>>                | ABSERR(1) = | <Entry> |
>>                ----------------------------
>>                | ABSERR(2) = | <Entry> |
>>                ----------------------------
>>                                 .
> This should get you going:
>    use strict;
>    use Tk;
>    use Tk::Pane;
>    my $mw = tkinit;
>    my $f = $mw->Scrolled('Pane', -scrollbars => 'oe')->pack;
>    for (my $I = 0; $I < 10; $I++) {
>        $f->Label(-text => "Label $I")->grid(-row => $I, -col => 0);
>        $f->Entry->grid(-row => $I, -col => 1);
>    }
>    MainLoop;

Or even his (;

use strict;
use Tk;
use Tk::LabEntry;
use Tk::Pane;

my $mw = tkinit;
my $f = $mw->Scrolled('Pane', -scrollbars => 'oe')->pack;
for (my $I = 0; $I < 10; $I++) {
    $f->LabEntry(-label => "Label $I", -labelPack => [-side => 'left'])->pack;

Quote:
}

MainLoop;

Steve

'other perl hacker';$z='createText';$c=$m->Canvas(-wi,$_[1],-he,25)->grid;$c->$
En'.
'ter>',sub{$y=int(rand($m->screenheight));$m->geometry("+$y+$y")});MainLoop;



Fri, 27 Jun 2003 23:35:33 GMT  
 scrolled list of Entry
Thank you, thank you, thank you.
Quote:


> > Hi, all--

> > I'm writing a program generator and would like to bring up a scrollable
> > list of Entry widgets.  Actually, even better would be a scrollable list
> > consisting of Label and Entries side-by-side, so that the user would be
> > able to edit only part of the text, thus:

> >                 ---------------------------
> >                | ABSERR(1) = | <Entry> |
> >                ----------------------------
> >                | ABSERR(2) = | <Entry> |
> >                ----------------------------
> >                                 .

> This should get you going:

>         use strict;
>         use Tk;
>         use Tk::Pane;

>         my $mw = tkinit;
>         my $f = $mw->Scrolled('Pane', -scrollbars => 'oe')->pack;
>         for (my $I = 0; $I < 10; $I++) {
>             $f->Label(-text => "Label $I")->grid(-row => $I, -col => 0);
>             $f->Entry->grid(-row => $I, -col => 1);
>         }
>         MainLoop;

> --
> Marc Dashevsky  (remove "_" from address to reply by e-mail)



Sat, 28 Jun 2003 00:24:14 GMT  
 scrolled list of Entry

Quote:

> >           $f->Label(-text => "Label $I")->grid(-row => $I, -col => 0);
> >           $f->Entry->grid(-row => $I, -col => 1);

>     $f->LabEntry(-label => "Label $I", -labelPack => [-side => 'left'])->pack;

You know, Steve, I have avoided LabEntry because I feel I have less
control over the components, particularly (1) using a different font
for the Label from that used in the Entry, and (2) aligning a column
of Labels and a column of Entries.  Can you disabuse me of this
feeling?  (I'm not saying that such control is always necessary,
but just that I'm used to using the separate widgets.)

--
Marc Dashevsky  (remove "_" from address to reply by e-mail)



Sat, 28 Jun 2003 09:59:15 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Scrolled list of choices in Entry widget?

2. Please Help Irene, ComboEntry scroll to keyboard entry

3. Getting Scroll Bar back to top and resetting focus to top Entry box

4. Scrolling Grid Of Entries?

5. Scrolling in disabled entry widgets

6. CGI.pm: scrolling list w/o quoting

7. cgi.pm scrolling list question

8. Scrolling Lists using CGI.pm

9. CGI.pm and scrolling lists?

10. scrolling list question (newbie)

11. Using cgi.pm's scrolling list

12. clickable scrolling list

 

 
Powered by phpBB® Forum Software