Hi all
I have reached the stage of my app where I am storing a lot of data (mainly
financial), and I need to allow the user to access it via some form of
enquiry screen. As there are many possible views, I want to start by
displaying summary information, and then allow the user to drill down on any
piece of data to show the details.
Accessing the data is no problem. On starting the enquiry a SQL statement
will be executed to select and display the summary information. On drilldown
(either via a mouse-click or navigating to the field and pressing <cr>),
another SQL statement will be executed to select the detail information, and
a new dialog will be opened to display it. This in turn can be drilled-down
further.
My question relates to the actual display of the information. I can think of
various approaches, but they all have pros and cons, so I thought I would
ask if anyone else has been down this road and has any suggestions.
My first thought was to use a Grid. Most of the information will be tabular,
so it will be easy to display. It is easy to over-ride the mouse-click and
<cr> events, and take appropriate action. The main downside is that it is
not very flexible from a layout point of view. I will need headings, text
fields, radio buttons to provide various options, etc. I am sure it could be
done with a Grid, but my gutfeel says that it will be difficult to achieve a
visually pleasing result.
My second thought was to use a GridBagSizer, and use TextCtrls to display
the data. It gives good flexibility for the layout, and it is easy to
over-ride the mouse-click and <cr>. One complication would be to allow the
user to use the arrow keys to move to a particular field. This would be
automatic with a Grid, but with TextCtrls I would have to maintain a
two-dimensional list of controls, detect the arrow key-press, and calculate
which control to move to. A second complication would be that I would need
to use a ScrolledWindow, as one of the options could be to allow the user to
select how many months to view, and they may select more than will fit onto
a normal window. I think these problems could be overcome, and on balance I
think the result would be better than using a Grid.
Then I had the idea of using HTML, using hyperlinks to trigger a drilldown.
I would have to abandon the idea of keyboard navigation to a particular
field, as I don't think that HTML supports it, but I could live with that.
I would have to decide between using a wxHtmlWindow, or using the Python
webbrowser module. The former is probably easier, but the latter would give
advantages such as the ability to open a drilldown in a separate window,
automatic printing, etc. I would have to figure out how to use a hyperlink
to call my function to execute a SQL statement - I am not sure how to do
this, but I am sure it can be done. On the other hand (I am thinking aloud
here) I would not be able to use any wx widgets such as radio buttons, so
maybe I should stick with wxHtmlWindow.
These are my thoughts so far. If anyone can provide any suggestions to
short-circuit my search for the ideal solution, I will be most grateful.
Many thanks
Frank Millman