Hi all,
I have asked a couple of questions about grids recently. I now have two
more. I think I should explain what I am trying to accomplish, otherwise the
questions may seem a bit odd.
I am writing a "simple" accounting system. I saw a reference to "simple" the
other day, which dovetails exactly with my feelings towards it. It went
something like this -
"I have done what you asked, but unfortunately I did not have the time to
come up with a simple solution, so I did it in a complicated way."
I believe that, for data entry purposes, it must be possible to enter and
accept a batch of transactions using only the keyboard. Obviously the mouse
can be used as well, but it should not be a requirement.
I am designing an invoice capture screen. There are a number of text
controls, such as Account Number, Invoice Date, etc, followed by a grid to
enter an unlimited number of detail lines, followed by some more text
controls, such as Invoice Total, Tax, etc, and then buttons for Save or
Cancel.
I want the user to be able to tab seamlessly from the first set of controls
into the grid, from there into the second set of controls, and backtab in
the opposite direction. It seems that grids are not really designed to work
this way, but I have come up with solutions to every problem I have come
across until now, and it is looking quite smooth.
Now I have bumped my head up against two problems that I cannot find a
solution to. Platforms are Windows 2000, Python 2.2.2, wxPython 2.4.0.2u,
and Linux (Redhat 8), Python 2.2.2, wxPython 2.4.0.2.
1. I use EVT_KEY_DOWN in the grid to detect tab and backtab. I can detect
them both in Linux. I can detect tab in Windows, but I cannot detect
backtab. If I display the keystrokes detected, it detects the shift key, but
returns nothing for the tab key.
2. I use SetCellHighlightPenWidth() to hide or show the grid cursor. I want
it to be visible while the user is in the grid, and invisible otherwise. I
can make it invisible initially. I can make it visible when the user enters
the grid. I cannot make it invisible again when they leave the grid, even
though I am calling SetCellHighlightPenWidth(0). This happens on both Linux
and Windows.
Any assistance will be much appreciated.
Frank Millman