Edited wx.grid and keyboard

The usual key for "edit this cell" is F2. That's what all of the Windows
spreadsheet apps use, including Excel. Then Enter commits the changes and
exits the editor, and Esc discards the changes and exits the editor.

   How about Ctrl-E (for 'edit')? The tab key is equivalent to the Enter key
and could be defined as moving to an adjacent cell in a specified direction.

   In XessSE, the linux/UNIX spreadsheet I've used for many years, all I need
do is place the cursor in a cell and start typing. Doesn't matter if I move
there by the arrow keys, tab key, or trackball. Works this way in the
wxPython text entry widgets, too.

"Print" is too unintuitive to be practical, in my opinion.

   Yup.

Rich

···

On Tue, 3 Jun 2008, Tim Roberts wrote:

--
Richard B. Shepard, Ph.D. | Integrity Credibility
Applied Ecosystem Services, Inc. | Innovation
<http://www.appl-ecosys.com> Voice: 503-667-4517 Fax: 503-667-8863

Glad to get some reply.
The only advantage of Control + Print was that it was unlikely anybody had already used such an awkward combination: if F2 has a meaning alike in Excel, people should not change their habits.
Rather selfishly, on the contrary, I would not switch to Ctrl-E because I already use it for allowing the edition of a single row in the grid (for saving afterwards the changes with another act). I am really old, and the idea scares me of being able of maiming haphazardly my data, and then forget completely this crime: better take some precautions.

···

2008/6/3 Rich Shepard rshepard@appl-ecosys.com:

On Tue, 3 Jun 2008, Tim Roberts wrote:

The usual key for “edit this cell” is F2. That’s what all of the Windows

spreadsheet apps use, including Excel. Then Enter commits the changes and

exits the editor, and Esc discards the changes and exits the editor.

How about Ctrl-E (for ‘edit’)? The tab key is equivalent to the Enter key

and could be defined as moving to an adjacent cell in a specified direction.

In XessSE, the linux/UNIX spreadsheet I’ve used for many years, all I need

do is place the cursor in a cell and start typing. Doesn’t matter if I move

there by the arrow keys, tab key, or trackball. Works this way in the

wxPython text entry widgets, too.

“Print” is too unintuitive to be practical, in my opinion.

Yup.

Rich

Richard B. Shepard, Ph.D. | Integrity Credibility

Applied Ecosystem Services, Inc. | Innovation

<http://www.appl-ecosys.com> Voice: 503-667-4517 Fax: 503-667-8863


wxpython-users mailing list

wxpython-users@lists.wxwidgets.org

http://lists.wxwidgets.org/mailman/listinfo/wxpython-users

Heh-heh-heh! Try switching between emacs (C, python, SQL, xhtml, and
LaTeX) and joe (for config and other sysadmin files which uses the old
WordStar key strokes) and something like OO.o's Writer. Ctrl-e moves the
cursor to the end of the line in the former two and changes justfication to
centered in the last one. PITA!

   But, our old codger venting is moving off topic. :slight_smile:

Rich

···

On Tue, 3 Jun 2008, raffaello wrote:

The only advantage of Control + Print was that it was unlikely anybody had
already used such an awkward combination: if F2 has a meaning alike in
Excel, people should not change their habits. Rather selfishly, on the
contrary, I would not switch to Ctrl-E because I already use it for
allowing the edition of a single row in the grid (for saving afterwards
the changes with another act). I am really old, and the idea scares me of
being able of maiming haphazardly my data, and then forget completely this
crime: better take some precautions.

--
Richard B. Shepard, Ph.D. | Integrity Credibility
Applied Ecosystem Services, Inc. | Innovation
<http://www.appl-ecosys.com> Voice: 503-667-4517 Fax: 503-667-8863

Done deal, F2 shall be.

So, the last version of the handler is:

def OnEVT_KEY_UP(self, event):
    if event.GetKeyCode() == 341 : #F2
           self.ShowCellEditControl()
    # if you want, as I do, to limit this possibility to a specific row,
    # just name it in a condition:
    # iif self.GetGridCursorRow() == self.EditedRow:
    #      self.ShowCellEditControl()

Surely it is possible to enter data directly into a grid, and when you cope with large amounts of many-faceted data it is a good thing to have the whole (and the sequence) under your eyes. A very good beginning for me was chapter 14 of WIA, God bless Robin, and starting from there you had better build your own editors and renderers. When and if you are interested, remember that I have some work already done and reduced to modules.

···

2008/6/4 Rich Shepard rshepard@appl-ecosys.com:

On Tue, 3 Jun 2008, raffaello wrote:

do you want to push me back to Ctrl-Print, or is there a monastery in Nepal

where they use that combination as a mantra? :slight_smile:

Raffaello,

There may well be a ^P mantra somewhere, but that does not make it most

suitable for your grid editor tools. Since we can enter data directly into a

text edit widget or a list control, can we also do so in a grid widget?

Since I’m hung up with my application seg faulting, I’ve not progressed to

really learning and understanding the family of editors for grid cells.

My second choice would be a function key such as F2.

Rich

Richard B. Shepard, Ph.D. | Integrity Credibility

Applied Ecosystem Services, Inc. | Innovation

<http://www.appl-ecosys.com> Voice: 503-667-4517 Fax: 503-667-8863


wxpython-users mailing list

wxpython-users@lists.wxwidgets.org

http://lists.wxwidgets.org/mailman/listinfo/wxpython-users