Howto prevent "paste" to table window from clipboard

forum.td.development (2005-2010)
StefanM
Germany
Posts: 663
Joined: 10 Aug 2018, 15:57
Location: Bavaria

Howto prevent "paste" to table window from clipboard

Post by StefanM » 14 Jul 2010, 19:51

 Posted by:  Stefan Misch 

Hi,

does anybody know how I can prevent the user from pasting rows from the
clipboard to a table window? How can I control that "SalEditCanPaste"
will return false (in "Edit" menu)?

TIA,
Stefan

Rainer Ebert

Howto prevent "paste" to table window from clipboard

Post by Rainer Ebert » 15 Jul 2010, 11:01

 Posted by:  Rainer Ebert 

I do not know how you can control SalEditCanPaste().

Implementation thougt: I think you can Enable the menu item if
"SalEditCanPaste() and not SalSendMsg( PAM_CannotEditTblCol, hWndTblCol, 0,
0)". On the table column Return True if the table cell is not editable.
Instead of hWndTblCol maybe it would be better to use hWndTbl and better
hWndItem/hWndForm to generalize this.

Regards,
Rainer

StefanM
Germany
Posts: 663
Joined: 10 Aug 2018, 15:57
Location: Bavaria

Howto prevent "paste" to table window from clipboard

Post by StefanM » 16 Jul 2010, 10:07

 Posted by:  Stefan Misch 

Hi,

I got a tip from a colleague:

Return FALSE on WM_PASTE for
- every column where paste should not be possible
- for the table window if paste should not be possible at all

Have fun,
Stefan

Return to “td.development”

Who is online

Users browsing this forum: [Ccbot], [Google] and 0 guests