xBrowse & Edit Cell

xBrowse & Edit Cell

Postby Loach » Thu Sep 03, 2009 2:33 pm

Hi!
It's necessary for me, that cell editing in some xBrowse cells started with the end of value of a cell.
(User input the address. He selects street from the another browse, then the pointer in a cell has to go on the end of streets name, and then the user input house and apartment numbers)
I tried :
Code: Select all  Expand view

   oBrw:aCols[ 6 ]:bEditWhen:={|uVal,self,nkey|(SelectStreet(@uVal,@nkey),oBrw:aCols[ 6 ]:Edit(VK_END),.F.)}

   Function SelectStreet(uVal,nkey)
         ...
         uVal:=oemtoansi(ALLTRIM(street->NAMES))+space(30)
   return .t.
 

but it doesn't work...
How can I make it?

Thank's
Best regards!
Sergey (Loach) Abelev
fwh 9.04/xHarbour 1.2.1 (Rev. 6406)/Bcc55
Loach
 
Posts: 41
Joined: Thu Dec 22, 2005 7:39 am
Location: Gomel, Belarus

Re: xBrowse & Edit Cell

Postby Loach » Fri Sep 04, 2009 11:40 am

So... I made it by changing this string in the end of method Edit(nKey) in class TXBrwColumn:
Instead
Code: Select all  Expand view
       if nKey != nil
          PostMessage( ::oEditGet:hWnd, WM_CHAR, nKey )
       endif
 

I put:
Code: Select all  Expand view

    if nKey != nil
       if !GetKeyState( VK_SHIFT ).and.(nKey IN {VK_END,VK_HOME})
          PostMessage( ::oEditGet:hWnd, WM_KEYDOWN, nKey )
       else
          PostMessage( ::oEditGet:hWnd, WM_CHAR, nKey )
       endif
    endif
 

In that case the code above (in first post) is work fine. But I don't know, is this way correct? :roll:
Best regards!
Sergey (Loach) Abelev
fwh 9.04/xHarbour 1.2.1 (Rev. 6406)/Bcc55
Loach
 
Posts: 41
Joined: Thu Dec 22, 2005 7:39 am
Location: Gomel, Belarus


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 67 guests

cron