xbrowse edit message (solved)

xbrowse edit message (solved)

Postby Richard Chidiak » Mon Aug 23, 2010 12:57 pm

I need to edit a column under conditions

my code

oBrw:aCols[5]:nEditType := EDIT_GET
oBrw:aCols[5]:bOnPostEdit := {|o, v, n| iif( n != VK_ESCAPE, (IF(! DET->SDETAIL,EDITLU(v,OBRW,@TABPARAM,,LCOPY,LMODE,TABSEC,@TABTOT), ) ), ) }
oBrw:aCols[5]:beditwhen := {|o, v, n| IF(DET->SDETAIL,.F. , .T.) }

when i dbl click on the column (when not allowed to edit) it is ok nothing happens

if i press on the enter key twice i get the following message

ocol:aeditlisttxt not defined

fivewin class txbrwcolumn

any idea ?


solution in changing method keydown xbrowse.prg

case nKey == VK_RETURN
oCol := ::SelectedCol()
if oCol:oEditGet != nil
PostMessage( oCol:oEditGet:hWnd, WM_KEYDOWN, nKey ) //VK_RETURN )
elseif oCol:lEditable .and. ! oCol:hChecked .and. ::lEnterKey2Edit .and. ! ( oCol:nEditType == EDIT_LISTBOX .or. oCol:nEditType == EDIT_GET_LISTBOX )
return oCol:Edit()
elseif (oCol:nEditType != EDIT_LISTBOX .or. oCol:nEditType != EDIT_GET_LISTBOX) .AND. oCol:lEditable // chidiak
//Simulate Click over button for no lost focus
PostMessage( oCol:oBtnList:hWnd, WM_LBUTTONDOWN, 1, 1 )
PostMessage( oCol:oBtnList:hWnd, WM_LBUTTONUP, 1, 1 )
elseif ::oTreeItem!=nil
If( ::oTreeItem:oTree != nil,( ::oTreeItem:Toggle(), ::Refresh() ),)
else
::GoRight()
endif
http://www.cbati.com

Uestudio
Fwh 13.05 Harbour 3.2 MSVC 2013
User avatar
Richard Chidiak
 
Posts: 946
Joined: Thu Oct 06, 2005 7:05 pm
Location: France

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 68 guests