Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community

At 03 NOV 1998 06:23:07PM Henry Bolton wrote:

I'm having a bit of trouble with cut/copy/paste in edittables.

In the RBasic help for EVENTQUALIFIER, I found some code which would set up cut/copy/paste menu items so that users can select these instead of using Ctrl-X/C/V. The menu quickevents use Send_Message to send CUT, COPY and PASTE messages to whatever control has focus at the time.

The problem is that Send_Message doesn't work with edittables. You can still use Ctrl-X/C/V because somehow these get handled without generating events, and you can cut, copy and paste using the right-click menu, but selecting my menu items doesn't have any effect. The Send_Message function returns a 0, indicating failure.

Has anyone else noticed this? How have you got around it?


At 03 NOV 1998 09:13PM Mike Ruane, WinWin Solutions Inc. wrote:

Henry-

You need to be in edit mode in a cell in order to use Cut/Copy/Paste.

The Edittable Control defaults to Navigation Mode.

Press the F2 key in a cell to get into Edit Mode, or refer to Cameron Purdy's Knowledge Base Article.

http://www.revelation.com/WEBSITE/knowledge.nsf/88e0581886ff6a0d8525651c004caecf/ca057d5ac3054eae852563bf005a2233?OpenDocument

Hope it helps-

Mike Ruane

WinWin Solutions Inc.


At 04 NOV 1998 10:26PM Henry Bolton wrote:

Hmmm.

Being in edit mode doesn't affect how Send_Message works.

It still won't do the cut and paste.

The bit of code to default to edit mode WAS interesting, though.

Henry.


At 05 NOV 1998 04:33AM cpates@sprezzatura.com,[url=http://www.sprezzatura.com]Sprezzatura Ltd[/url] wrote:

Henry,

According to the on-line help the Send_Message functions only work in the Edit Line, Edit Box and ComboBox controls. I suspect that this is because that they encapsulate the standard windows WM_CUT, WM_COPY and WM_PASTE messages which are only for those controls too.

You could write your own function which checks the control type first and if it's an Edit Table get the cell/rowdata and set/get_property the TEXT property of the CLIPBOARD object.

cpates@sprezzatura.com

Sprezzatura Ltd

World Leaders in all things RevSoft


At 05 NOV 1998 04:07PM Henry Bolton wrote:

]You could write your own function which checks the control type first

]and if it's an Edit Table get the cell/rowdata and set/get_property

]the TEXT property of the CLIPBOARD object.

Aha! That's what we've already done - and here's the problem:

If you use Ctrl-V to paste something into an edit table, the text gets pasted (presumably by Windows), then my menu event gets triggered by the Ctrl-V shortcut and the text gets pasted again!

My current thinking is that the menu events should not have keyboard shortcuts. Windows will take care of the clipboard operations if the user presses Ctrl-X/C/V, and my events could do the same thing if the user selects Cut, Copy and Paste through the menu. The problem then is that there's no indication in the menu of what the keyboard shortcuts are, which seems to be a standard Windows application feature.

Aaaargh! Infuriating!


At 09 NOV 1998 07:49AM Cameron Revelation wrote:

Henry,

Use a TAB and then the description of the keystroke appended to the text instead of putting an accellerator on the menu item.

Cameron Purdy

Revelation Software

View this thread on the forum...

  • third_party_content/community/commentary/forums_nonworks/02d1575b4c085750852566b1008075b5.txt
  • Last modified: 2023/12/28 07:40
  • by 127.0.0.1