Howto prevent "paste" to table window from clipboard

forum.td.development (2005-2010)
NewsgroupServer
Robot
Robot
Posts: 116488
Joined: 24 Feb 2017, 12:00
Location: World wide

Howto prevent "paste" to table window from clipboard

Post by NewsgroupServer » 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

NewsgroupServer
Robot
Robot
Posts: 116488
Joined: 24 Feb 2017, 12:00
Location: World wide

Howto prevent "paste" to table window from clipboard

Post by NewsgroupServer » 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

NewsgroupServer
Robot
Robot
Posts: 116488
Joined: 24 Feb 2017, 12:00
Location: World wide

Howto prevent "paste" to table window from clipboard

Post by NewsgroupServer » 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: No registered users and 0 guests