Hello all.
I've built a GUI that is used for data entry. It consists of one column
of row labels on the left, one column of checkbutton widgets on the
right and multiple columns of entry widgets in between. Each entry
widget column corresponds to a date and those columns must be shown in time-order. The top row contains label widgets for column captions.
All are managed by grid.
I would like the user to be able to insert additional columns of entry widgets at any time, analogous to inserting new columns in a
spreadsheet. As the entry-columns must remain in time-order, some
columns must be shifted to the right.
Maybe I'm wrong but the grid geometry manager does not make this an easy
task to implement. First, it doesn't support an insertion operation,
just replace or append. So, what I had to do was to tell grid to remove/forget the columns to the right of the insertion point, append
the new column and then append the forgotten ones. However, that messes
up the stacking order because the new widgets are newer than the ones to their right.
That can be solved either by destroying and then recreating the columns
to be right-shifted or just destroying all of them and then recreating
them in the desired order. Either approach works.
So I'm asking for alternatives that would allow the user to
dynamically insert columns whenever the mood strikes. I've looked
about for existing packages that support this type of operation but
haven't found one.
* Michael Soyka <mssr953@gmail.com>I think I did but I'll have another look-see. Thanks!
| So I'm asking for alternatives that would allow the user to
| dynamically insert columns whenever the mood strikes. I've looked
| about for existing packages that support this type of operation but haven't | found one.
Did you check tablelist?
https://www.nemethi.de
See also the recent post by Csaba regarding the current new version
Message-ID: <u7u8bn$23esr$1@tota-refugium.de>
ANNOUNCE: Multi-column listbox and tree widget package Tablelist 6.22
HTH
R'
Michael Soyka <mssr953@gmail.com> wrote:Users will want to enter data left-to-right using the tab key. As a
Hello all.
I've built a GUI that is used for data entry. It consists of one column
of row labels on the left, one column of checkbutton widgets on the
right and multiple columns of entry widgets in between. Each entry
widget column corresponds to a date and those columns must be shown in
time-order. The top row contains label widgets for column captions.
All are managed by grid.
I would like the user to be able to insert additional columns of entry
widgets at any time, analogous to inserting new columns in a
spreadsheet. As the entry-columns must remain in time-order, some
columns must be shifted to the right.
Maybe I'm wrong but the grid geometry manager does not make this an easy
task to implement. First, it doesn't support an insertion operation,
just replace or append. So, what I had to do was to tell grid to
remove/forget the columns to the right of the insertion point, append
the new column and then append the forgotten ones. However, that messes
up the stacking order because the new widgets are newer than the ones to
their right.
As long as the new ones are above the container which is "gridding"
them all, how is this a problem? And new ones, by being new, and on
top, should always be above the container performing the grid
management.
Obviously, I never though of that! Note to self- why didn't I think ofThat can be solved either by destroying and then recreating the columns
to be right-shifted or just destroying all of them and then recreating
them in the desired order. Either approach works.
No need to destroy anything to change the stacking order. Just 'raise'
the widgets that need to be raised.
Thanks again for the suggestions- I'll look into them both.So I'm asking for alternatives that would allow the user to
dynamically insert columns whenever the mood strikes. I've looked
about for existing packages that support this type of operation but
haven't found one.
Have you tried using a treeview (without using the tree portion). It
allows its columns to be ordered in an arbitrary order, so you could
create a new column, then position it where you want and the rest
should adjust accordingly.
Another alternative could be tablelist (https://www.nemethi.de/). It
has insertcolumns and deletecolumns subcommands which would seem to be
just what you are asking for.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 485 |
Nodes: | 16 (2 / 14) |
Uptime: | 131:55:25 |
Calls: | 9,655 |
Calls today: | 3 |
Files: | 13,707 |
Messages: | 6,166,577 |