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

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

Postby Enrico Maria Giordano » Thu Nov 05, 2020 9:56 am

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: 8711
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

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

Postby Enrico Maria Giordano » Fri Nov 06, 2020 9:57 am

This is a sample of the problem:

Code: Select all  Expand view
#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: 8711
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

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

Postby Enrico Maria Giordano » Fri Nov 06, 2020 1:28 pm

The problem is not there using dialogs:

Code: Select all  Expand view
#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: 8711
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

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

Postby Enrico Maria Giordano » Fri Nov 06, 2020 1:33 pm

This is a workaround:

Code: Select all  Expand view
#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
User avatar
Enrico Maria Giordano
 
Posts: 8711
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 108 guests