Xbrowse , bPastEof()

Xbrowse , bPastEof()

Postby Frank Demont » Fri Feb 24, 2006 9:27 am

Hello,

Using xbrowse , i have problems with bPasteof() when the verical scroll bar is used .

This bar can be used to scroll trough the database , and to put the record pointer on the last row.

Now we can append with :

1) Pressing Key Down : ok it works

2) Clicking on the bottom from the vertical scroll bar

WE BECOME A LOOPING FROM EXECUTING bPAstEof !!!!!!!!!!!!

In testxbrw.prg , i changed :

STATIC FUNCTION AutoEdit( oWnd )

local oChild, oBrw, oCol
local nFor

DEFINE WINDOW oChild TITLE "Auto edit browse" MDICHILD OF oWnd

oBrw := TXBrowse():New( oWnd )

oBrw:nMarqueeStyle := MARQSTYLE_HIGHLCELL
oBrw:nColDividerStyle := LINESTYLE_BLACK
oBrw:nRowDividerStyle := LINESTYLE_BLACK
oBrw:lColDividerComplete := .t.

oBrw:SetRDD()

for nFor := 1 to len( oBrw:aCols )
oCol := oBrw:aCols[ nFor ]
oCol:nEditType := 1
oCol:bOnPostEdit := {|o, v, n| iif( n != VK_ESCAPE, FieldPut( o:nCreationOrder, v ), ) }
next

oBrw:CreateFromCode()
oChild:oClient := oBrw

oBrw:bPastEof() := {||msginfo("APND")} // ADDED !!!!!!!!!!!!

ACTIVATE WINDOW oChild ON INIT oBrw:SetFocus()

RETURN NIL


CAN IT BE CONFIRMED ???????


Frank
Frank Demont
 
Posts: 142
Joined: Sun Oct 09, 2005 10:59 am

Postby Frank Demont » Fri Feb 24, 2006 10:14 am

A (bad) solution is to disable EVAL(bPastEof) in method godown :

if ::bPastEof != nil
IF PROCNAME(1) <> "TXBROWSE:VSCROLL"
Eval( ::bPastEof )
Endif
endif
Frank Demont
 
Posts: 142
Joined: Sun Oct 09, 2005 10:59 am


Return to FiveWin for Harbour/xHarbour

Who is online

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