Scrolling Grid Of Entries? 
Author Message
 Scrolling Grid Of Entries?

I have to build a tool to maintain a table of data.  I
wanted to build a display which composed of a grid
of entry widgets which could be updated individually.

I cant figure out how to get a grid of entry widgets
to scroll with scrollbars.  Does anybody have any
information on this???  Is there a better way of handling
the data than a panel of entry widgets???

Any help would be greatly appreciated

Monty




Fri, 14 Jul 2000 03:00:00 GMT  
 Scrolling Grid Of Entries?



Quote:
> I have to build a tool to maintain a table of data.  I
> wanted to build a display which composed of a grid
> of entry widgets which could be updated individually.

> I cant figure out how to get a grid of entry widgets
> to scroll with scrollbars.  Does anybody have any
> information on this???  Is there a better way of handling
> the data than a panel of entry widgets???

        Hi,

        You may use the Tk::Table module. But if this does not correspond
        to what you want, you may always do something as follows :

                1) create a scrolled canvas.
                2) put a frame window in the canvas anchor nw , position 0,0.
                3) put anything you want in the frame, using grid or pack
                   or place as you want.

        Then you almost have what you want.
        The problem is now to obtain the real width and height of the
        frame to be able to set (configure) the scrolling region of the
        canvas (don't forget the -confine => 'yes' option).
        If somebody knows how to get the real width and height in pixel
        of any wiget (especially a frame), please help me, because the
        $wiget->width and $widget->height does not give me this information
        but only the required width or height (set by options -width and
        -height), or 1 (if not set using those options), and that does not
        help me. I would like to obtain the bounding box (in pixel) which
        describe all the space occupied by my widget on the canvas.

                Francois TROUSSET



Sun, 16 Jul 2000 03:00:00 GMT  
 Scrolling Grid Of Entries?



:> I have to build a tool to maintain a table of data.  I
:> wanted to build a display which composed of a grid
:> of entry widgets which could be updated individually.
:>
:> I cant figure out how to get a grid of entry widgets
:> to scroll with scrollbars.  Does anybody have any
:> information on this???  Is there a better way of handling
:> the data than a panel of entry widgets???

:       Hi,

:       You may use the Tk::Table module. But if this does not correspond
:       to what you want, you may always do something as follows :

:               1) create a scrolled canvas.
:               2) put a frame window in the canvas anchor nw , position 0,0.
:               3) put anything you want in the frame, using grid or pack
:                  or place as you want.

:       Then you almost have what you want.
[...]

No need to reinvent the wheel here :-)  Get Tk::Pane widget
from Tk-GBARR distribution on CPAN.

        perl -MCPAN -e install Tk::Pane

Achim



Sun, 16 Jul 2000 03:00:00 GMT  
 Scrolling Grid Of Entries?

Quote:

> I have to build a tool to maintain a table of data.  I
> wanted to build a display which composed of a grid
> of entry widgets which could be updated individually.

> I cant figure out how to get a grid of entry widgets
> to scroll with scrollbars.  Does anybody have any
> information on this???  Is there a better way of handling
> the data than a panel of entry widgets???

Tk::Pane will do what you want. Tk::Pane is actually a scrollable
frame widget. Once created you can create Entry widgets on
it and use the grid() manager.

Tk::Pane is part of my Tk-GBARR distribution which
you can get from my directory (authors/id/GBARR)
on any CPAN mirror site.

Graham.

--
Originality is the ability to conceal your source.



Sun, 16 Jul 2000 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. scrolled grid?

2. scrolling w/ grid

3. Help: scrollable grid of entries.

4. Determining cursor location in a grid of Entry's

5. Please Help Irene, ComboEntry scroll to keyboard entry

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

7. Scrolled list of choices in Entry widget?

8. scrolled list of Entry

9. Scrolling in disabled entry widgets

10. get a bus error using grid manager and very large grid numbers

11. Tk::Scrolled-widget does not scroll with Cursor-Up/Down-Keys

12. A Scrolled of a Scrolled Window

 

 
Powered by phpBB® Forum Software