Hello, and request for help with 'dynamic grids'

S

Simon Cropper

Hi,

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
sqlite-based database.

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.
sqlite3 database.
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
clipboard.

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?

--
Cheers Simon

Simon Cropper - Open Content Creator / Website Administrator

Free and Open Source Software Workflow Guides
 
S

Steven D'Aprano

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.

What GUI toolkit are you using?
 
S

Simon Cropper

What GUI toolkit are you using?

I have looked at wxGlade, Boa Constructor, wxFormBuilder, tkinder, I
have also looked through the Python website many times looking for
commands that would allow me to create a GUI from scratch.

--
Cheers Simon

Simon Cropper - Open Content Creator / Website Administrator

Free and Open Source Software Workflow Guides
 
A

alex23

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?

The commercial product Resolver One provides a grid/spreadsheet style
interface with Python scripting capabilities. I'm not sure of its
current licensing status but I believe it used to be free if used on
open source projects.

http://www.resolversystems.com/products/resolver-one/

Each spreadsheet itself is Python code; I think it should be quite do-
able to take something with introspective SQL capabilities like
SQLAlchemy and have it title columns and fill them with the correct
fields accordingly.

Hope this helps.
 
S

Simon Cropper

The commercial product Resolver One provides a grid/spreadsheet style
interface with Python scripting capabilities. I'm not sure of its
current licensing status but I believe it used to be free if used on
open source projects.

http://www.resolversystems.com/products/resolver-one/

Each spreadsheet itself is Python code; I think it should be quite do-
able to take something with introspective SQL capabilities like
SQLAlchemy and have it title columns and fill them with the correct
fields accordingly.

Hope this helps.

Alex,

The Resolver Package looks good. Not exactly open source though. I
equate it to a proprietary package that can at times be used for free by
select groups.

The product creates spreadsheets with python code in the background
(instead of say VBA in Excel or Basic in Calc).

Access to a database still needs to be hard-wired, so it does not act as
a 'dynamic' viewer. The product works pretty much like Excel and Calc in
this manner.

Sheets can be shared, although the Resolver Exchange website does not
clarify the licence under which samples are released (GPL, CC, etc), so
it is debatable how any of this could reliably be used in creation of
derivatives.

From what I can glean from this page...

http://www.resolversystems.com/opensource/

... Resolver will allow you to use the package if you are an open
source project to create spreadsheets that can be redistributed. For
people to use these sheets they need to download the viewer or purchase
the package.

--
Cheers Simon

Simon Cropper - Open Content Creator / Website Administrator

Free and Open Source Software Workflow Guides
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Hello everyone 0
Hello and Help please :-) 1
Hello 4
Hello there 3
Hello everyone, I would need help in bioinfo please. 3
Hello from Bulgaria 0
Hello to community. 3
Hello my fellow gamers 0

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,516
Members
44,984
Latest member
PeakCBDGummiesReview

Latest Threads

Top