Brw:VGoBottom() does not work in xBrowse [SOLVED]

Brw:VGoBottom() does not work in xBrowse [SOLVED]

Postby MOISES » Tue Jun 09, 2020 8:35 am

Good morning, Antonio,

To finish solving the problem of xBrowse and SQLRDD, since Nages doesn't answer the messages, I need to be able to move the vertical scroll bar.

However, oBrw:VGoBottom() and SendMsg( VK_DOWN ) do not work. They don't do anything.

Here is an example.

Code: Select all  Expand view  RUN
#Include "FiveWin.Ch"
#include "xbrowse.ch"

#include "hbcompat.ch"



FUNCTION Main()

   use c:\fwh\samples\customer

   TESTBROWSE()

   dbcloseall()


   quit


return nil





function TESTBROWSE()

   local oDlg
   local oBrw

   define dialog oDlg title "Test xBrowse " + cvaltochar(datetime()) from 0,0 to 24,79


    @ 0,0 xbrowse oBrw datasource alias() of oDlg fastedit autocols autosort ;
    SIZE -1, -1 PIXEL

    oBrw:nRowHeight := 25


    oBrw:lAutoappend := .t.
    oBrw:CreateFromCode()


    activate dialog oDlg centered ;
             on init ( oBrw:VGoBottom(), oBrw:oVScroll:SendMsg( VK_DOWN ) )

return nil
 


I'd appreciate your help, since I've been requesting for the fix since December and the customers are extremely pissed off.

Thank you very much. Greetings
Last edited by MOISES on Thu Jun 11, 2020 12:21 pm, edited 1 time in total.
Saludos / Regards,

FWH 20.04, Harbour 3.2.0 dev (r1909261630) y BCC 7.40
MOISES
 
Posts: 838
Joined: Wed Aug 22, 2007 10:09 am

Re: Brw:VGoBottom() does not work in xBrowse

Postby ukoenig » Tue Jun 09, 2020 10:16 am

Just define the needed position from inside the used DBF
and not from a defined xBrowse row-position like :

activate dialog oDlg centered ;
on init DBGOBOTTOM() // seek or anything else

// on init ( oBrw:VGoBottom(), oBrw:oVScroll:SendMsg( VK_DOWN ) )

regards
Uwe :D
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: Brw:VGoBottom() does not work in xBrowse

Postby MOISES » Tue Jun 09, 2020 10:19 am

Hi,

Thank you for your reply.

But I need to force such behaviour in order to get xBrowse work under SQLRDD, as this is the failing issue.
Saludos / Regards,

FWH 20.04, Harbour 3.2.0 dev (r1909261630) y BCC 7.40
MOISES
 
Posts: 838
Joined: Wed Aug 22, 2007 10:09 am

Re: Brw:VGoBottom() does not work in xBrowse [solved]

Postby MOISES » Thu Jun 11, 2020 12:14 pm

Thanks to Cristobal´s help, this is the fix:

Code: Select all  Expand view  RUN


METHOD KeyCount() CLASS TXBrowse

   TRY
      if Empty( ::aFilter )
         ::nLen   := Eval( ::bKeyCount )
      else
         ::nLen   := Len( ::aFilter )
      endif
      ::lClosed   := .f.

   CATCH
      ::nLen      := 0
      ::lClosed   := .t.
   END


   if ::oVScroll != nil
      ::VSetRange( 1, ::nLen )

      if !::lSqlRDD
        ::VUpdatePos()
      endif
   endif

return ::nLen


 
Saludos / Regards,

FWH 20.04, Harbour 3.2.0 dev (r1909261630) y BCC 7.40
MOISES
 
Posts: 838
Joined: Wed Aug 22, 2007 10:09 am

Re: Brw:VGoBottom() does not work in xBrowse [SOLVED]

Postby nageswaragunupudi » Thu Jun 11, 2020 5:40 pm

There is no need to use this method directly.

viewtopic.php?f=3&t=38745&p=233158#p233158
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10651
Joined: Sun Nov 19, 2006 5:22 am
Location: India


Return to FiveWin for Harbour/xHarbour

Who is online

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