Input format at column and ^C ^V

forum.advanced.programming (1998-2005)
As

Input format at column and ^C ^V

Post by As » 22 Feb 2005, 12:22

 Posted by:  As 

I have 3 data columns.

only the second column has input format.

In this column I can´t use ^C and ^V to copy and paste.

What´s wrong, can´t I use input format?

Attachment: DateColumn.apt

Mårten Fagerholm

Input format at column and ^C ^V

Post by Mårten Fagerholm » 22 Feb 2005, 12:43

 Posted by:  marten_fagerholm%metso_com 

Take away the input mask and then it will work.

regards mårten

As

Input format at column and ^C ^V

Post by As » 22 Feb 2005, 14:42

 Posted by:  As 

But I need input mask

news:IUWzCPNGFHA.2396@guptaweb...
Take away the input mask and then it will work.

regards mårten

Alberto Aviles

Input format at column and ^C ^V

Post by Alberto Aviles » 22 Feb 2005, 23:55

 Posted by:  Alberto Aviles \(mx\) 

doit with the format... u can make ur own format

Darren C

Input format at column and ^C ^V

Post by Darren C » 23 Feb 2005, 01:37

 Posted by:  Darren C 

This code should do it.

Column: colInputMask
Message Actions
On SAM_SetFocus
Set hCopy = VisWinLoadAccelerator (hWndItem, SAM_User, KDS_Ctrl,
VK_C, VK_C)
Set hPaste = VisWinLoadAccelerator( hWndItem, SAM_User, KDS_Ctrl,
VK_V, VK_V )
On SAM_KillFocus
Call VisWinFreeAccelerator( hCopy )
Call VisWinFreeAccelerator( hPaste )
On SAM_User
If lParam = VK_C
Call SalEditCopyString( colInputMask )
Else If lParam = VK_V
Call SalEditPaste( )

Note that the contents of the clipboard will NOT include the mask
characters, which is normally what you want anyhow. Also, the paste fails
if the clipboard data is not correct format.

Obviously change SAM_User to a better constant and maybe move this code to a
column class. This works for datafields too.

As

Input format at column and ^C ^V

Post by As » 23 Feb 2005, 12:10

 Posted by:  As 

Thnaks

Return to “advanced.programming”

Who is online

Users browsing this forum: [Ccbot] and 0 guests