Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #12757

Hello, and request for help with 'dynamic grids'

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.albasani.net!news.mixmin.net!feeder.news-service.com!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <simoncropper@fossworkflowguides.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.005
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'anyway': 0.03; 'attributes': 0.05; 'width': 0.05; 'migrate': 0.07; 'python': 0.08; 'bash': 0.09; 'grid': 0.09; 'presume': 0.09; 'runtime': 0.09; 'displayed': 0.10; 'developer': 0.12; 'accordingly,': 0.16; 'allocate': 0.16; 'buffering': 0.16; 'columns': 0.16; 'resized': 0.16; 'row': 0.16; 'rows': 0.16; 'sqlite3': 0.16; 'ubuntu,': 0.16; 'workflow': 0.16; 'linux': 0.17; 'rapidly': 0.18; 'appears': 0.20; 'primarily': 0.21; 'subject:help': 0.22; 'cheers': 0.23; 'appear': 0.23; 'extract': 0.24; 'originally': 0.24; 'windows': 0.26; 'lists': 0.28; 'pass': 0.29; 'basics': 0.29; 'elements': 0.29; 'gis': 0.29; 'array': 0.30; 'creator': 0.30; 'edited': 0.30; 'table.': 0.30; 'equivalent': 0.31; 'list': 0.32; 'this.': 0.32; 'hi,': 0.32; 'familiar': 0.32; 'generally': 0.32; 'source': 0.33; "can't": 0.33; 'there': 0.33; 'to:addr:python-list': 0.33; 'header :User-Agent:1': 0.34; 'filter': 0.34; 'tables': 0.34; 'view,': 0.34; 'defining': 0.34; 'entry': 0.35; 'record': 0.35; 'received:au': 0.36; 'created': 0.36; 'keyboard': 0.37; 'languages': 0.37; 'using': 0.37; 'put': 0.37; 'but': 0.37; 'open': 0.37; 'could': 0.38; 'development.': 0.38; 'allows': 0.38; 'screen': 0.38; 'e.g.': 0.39; 'window': 0.39; 'subject:with': 0.39; 'actively': 0.39; 'missing': 0.39; 'data': 0.39; 'to:addr:python.org': 0.39; 'hit': 0.40; 'easily': 0.61; 'order': 0.62; 'life': 0.63; 'free': 0.63; 'here': 0.65; 'website': 0.65; 'received:202': 0.66; 'view': 0.67; 'show': 0.67; 'guides': 0.67; 'selected': 0.68; 'database,': 0.68; 'supply': 0.69; 'subject:Hello': 0.72; 'records': 0.72; 'database.': 0.74; 'browsing': 0.77; 'column,': 0.84
Date Mon, 05 Sep 2011 15:18:30 +1000
From Simon Cropper <simoncropper@fossworkflowguides.com>
User-Agent Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.21) Gecko/20110831 Lightning/1.0b2 Thunderbird/3.1.13
MIME-Version 1.0
To python-list@python.org
Subject Hello, and request for help with 'dynamic grids'
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
X-AntiAbuse This header was added to track abuse, please include it with any abuse report
X-AntiAbuse Primary Hostname - lincpan30.siteportal.com.au
X-AntiAbuse Original Domain - python.org
X-AntiAbuse Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse Sender Address Domain - fossworkflowguides.com
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.12
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.765.1315202654.27778.python-list@python.org> (permalink)
Lines 52
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1315202654 news.xs4all.nl 2500 [2001:888:2000:d::a6]:55760
X-Complaints-To abuse@xs4all.nl
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:12757

Show key headers only | View raw


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
    ------------------------------------------------------------
    Introduction               http://www.fossworkflowguides.com
    GIS Packages               http://gis.fossworkflowguides.com
    bash / Python        http://scripting.fossworkflowguides.com

Back to comp.lang.python | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Hello, and request for help with 'dynamic grids' Simon Cropper <simoncropper@fossworkflowguides.com> - 2011-09-05 15:18 +1000
  Re: Hello, and request for help with 'dynamic grids' Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-09-05 17:19 +1000
    Re: Hello, and request for help with 'dynamic grids' Simon Cropper <simoncropper@fossworkflowguides.com> - 2011-09-05 20:07 +1000
  Re: Hello, and request for help with 'dynamic grids' alex23 <wuwei23@gmail.com> - 2011-09-05 07:40 -0700
    Re: Hello, and request for help with 'dynamic grids' Simon Cropper <simoncropper@fossworkflowguides.com> - 2011-09-06 09:09 +1000

csiph-web