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

Post Reply
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

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

Post 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
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

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

Post 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
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

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

Post 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
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

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

Post 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
Post Reply