Hello, and request for help with 'dynamic grids'
simoncropper at fossworkflowguides.com
Mon Sep 5 07:18:30 CEST 2011
I am a applications developer - originally from Windows using primarily
Visual Foxpro, although I am familiar with a variety of other xbase
derivatives. I now use Linux / Ubuntu, and have been actively teaching
myself Python with the view to migrate most of my applications to
I am looking for the ability to create dynamic grids in a window but
can't for the life of me find how to do this.
Here is the functionality that I desire...
1. Have a dialog appear that allows me to select a database, e.g.
2. Select table in the database and have all the records appear in a
grid. Fields represented as column, width and order adjustable, rows
representing records. Each cell can be edited directly.
3. I would like to create filters on this grid based on attributes in
the table. So if the table is a list of names, filter and show only
those people with a particular first name. For people familiar with
xbase languages it equivalent to browsing a table and applying a filter.
4. Once the record is identified I would like to select the record or
hit enter to have the data sent to the keyboard buffer or put into the
I have found most of these elements available. I can create dialogs, I
can connect to a database, I can extract data from the tables using SQL
but I can't find how to easily get these lists into a grid -- it appears
to me you need to allocate list record 1 to grid row 1, list record 2 to
grid row 2, etc and manage how many rows are displayed and 'page'
through the table.
Am I missing something? I presume that you could just supply a list or
array selected using SQL from a table and just pass this data to a grid
and have it manage all the basics like if the window is resized the
number of rows and columns are adjusted accordingly, buffering records, etc.
My investigations have generally found that windows/forms/data entry
screen can be created for a specific table or view, but these are
hard-wired during development. Is there anyway of rapidly defining the
grid during runtime so any table can be viewed?
Simon Cropper - Open Content Creator / Website Administrator
Free and Open Source Software Workflow Guides
GIS Packages http://gis.fossworkflowguides.com
bash / Python http://scripting.fossworkflowguides.com
More information about the Python-list