Page 1 of 1

XBrowse: a problem with GoRight() and GoToCol()

Posted: Thu Nov 05, 2020 9:56 am
by Enrico Maria Giordano
Using GoRight() and GoToCol() methods I noticed that the first columns of the browse are sometimes shifted left and no more visible even if there are plenty of space for them.

Any workaround?

EMG

Re: XBrowse: a problem with GoRight() and GoToCol()

Posted: Fri Nov 06, 2020 9:57 am
by Enrico Maria Giordano
This is a sample of the problem:

Code: Select all

#include "Fivewin.ch"


FUNCTION MAIN()

    LOCAL oWnd, oBrw

    USE CUSTOMER

    DEFINE WINDOW oWnd

    @ 0, 0 XBROWSE oBrw ALIAS "CUSTOMER"

    oBrw:CreateFromCode()

    ACTIVATE WINDOW oWnd;
             ON INIT ( oWnd:SetSize( 850, 600 ),;
                       oWnd:oClient := oBrw,;
                       oBrw:GoToCol( 4 ) )

    CLOSE

    RETURN NIL
EMG

Re: XBrowse: a problem with GoRight() and GoToCol()

Posted: Fri Nov 06, 2020 1:28 pm
by Enrico Maria Giordano
The problem is not there using dialogs:

Code: Select all

#include "Fivewin.ch"


FUNCTION MAIN()

    LOCAL oWnd, oBrw

    USE CUSTOMER

    DEFINE DIALOG oWnd

    @ 0, 0 XBROWSE oBrw ALIAS "CUSTOMER"

    oBrw:CreateFromCode()

    ACTIVATE DIALOG oWnd;
             ON INIT ( oWnd:SetSize( 850, 600 ),;
                       oBrw:AdjClient(),;
                       oBrw:GoToCol( 4 ) )

    CLOSE

    RETURN NIL
EMG

Re: XBrowse: a problem with GoRight() and GoToCol()

Posted: Fri Nov 06, 2020 1:33 pm
by Enrico Maria Giordano
This is a workaround:

Code: Select all

#include "Fivewin.ch"


FUNCTION MAIN()

    LOCAL oWnd, oBrw

    USE CUSTOMER

    DEFINE WINDOW oWnd

    @ 0, 0 XBROWSE oBrw ALIAS "CUSTOMER"

    oBrw:CreateFromCode()

    ACTIVATE WINDOW oWnd;
             ON INIT ( oWnd:SetSize( 850, 600 ),;
                       oBrw:SetSize( 10000, 10000 ),;
                       oWnd:oClient := oBrw,;
                       oBrw:GoToCol( 4 ) )

    CLOSE

    RETURN NIL
EMG