FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour XBROWSE Columnas Focalizada
Posts: 492
Joined: Wed Nov 16, 2005 12:03 PM
XBROWSE Columnas Focalizada
Posted: Sun Apr 26, 2015 12:29 AM

Saludos Cordiales
Tengo un browse con 14 columnas, 8 columnas son visibles y cuando navego a la columna 14 ,
mediante oBrw:nColSel, obtengo la posicion visual y no la posicion funcional, si estoy en la columna 14, oBrw:nColSel me indica numero 10 (debido a que se visualizan 10 columnas)

Posts: 492
Joined: Wed Nov 16, 2005 12:03 PM
Re: XBROWSE Columnas Focalizada
Posted: Sun Apr 26, 2015 01:02 AM
jnavas wrote:Saludos Cordiales
Tengo un browse con 14 columnas, 8 columnas son visibles y cuando navego a la columna 14 ,
mediante oBrw:nColSel, obtengo la posicion visual y no la posicion funcional, si estoy en la columna 14, oBrw:nColSel me indica numero 10 (debido a que se visualizan 10 columnas)


Saludos,
Mediante esta simple ecuación logre determinar la columna focalizada.
(oBrw:nColOffset+oBrw:nColSel-1)
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: XBROWSE Columnas Focalizada
Posted: Sun Apr 26, 2015 01:09 AM
In xbrowse, user can move and shuffle the columns at runtime. The column numbers will not be in the same order as you created.

In xbrowse, please do not program with column numbers but only with column objects.

However
Code (fw): Select all Collapse
oBrw:SelectedCol():nCreationOrder

gives the column number of the selected column when you created the browse
Regards



G. N. Rao.

Hyderabad, India
Posts: 492
Joined: Wed Nov 16, 2005 12:03 PM
Re: XBROWSE Columnas Focalizada
Posted: Sun Apr 26, 2015 06:10 AM

G. N. Rao.
Gracias por valioso aporte y amabilidad, obtuve el numero de la columna focalizada.

Posts: 492
Joined: Wed Nov 16, 2005 12:03 PM
Re: XBROWSE Columnas Focalizada
Posted: Sun Apr 26, 2015 06:24 AM
I suggest creating a method ColFocused () INLINE :: aCols [:: SelectedCol (): nCreationOrder ]

nageswaragunupudi wrote:In xbrowse, user can move and shuffle the columns at runtime. The column numbers will not be in the same order as you created.

In xbrowse, please do not program with column numbers but only with column objects.

However
Code (fw): Select all Collapse
oBrw:SelectedCol():nCreationOrder

gives the column number of the selected column when you created the browse
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: XBROWSE Columnas Focalizada
Posted: Sun Apr 26, 2015 06:54 AM
I suggest creating a method ColFocused () INLINE :: aCols [:: SelectedCol (): nCreationOrder ]

Please kindly note that we discourage using numbers to refer to columns, because in xbrowse, column positions and their numbers are dynamic at runtime. Programming with column numbers can lead several undetectable bugs.
We recommend using column objects. This is the safest way. A necessary change and difference from all other browses.
Kindly follow our recommended approach.
Regards



G. N. Rao.

Hyderabad, India
Posts: 492
Joined: Wed Nov 16, 2005 12:03 PM
Re: XBROWSE Columnas Focalizada
Posted: Sun Apr 26, 2015 07:30 AM
nageswaragunupudi wrote:
I suggest creating a method ColFocused () INLINE :: aCols [:: SelectedCol (): nCreationOrder ]

Please kindly note that we discourage using numbers to refer to columns, because in xbrowse, column positions and their numbers are dynamic at runtime. Programming with column numbers can lead several undetectable bugs.
We recommend using column objects. This is the safest way. A necessary change and difference from all other browses.
Kindly follow our recommended approach.


Thanks for such a wise recommendation.
That is why I suggested creating a method that provides targeted regardless of the position of the visual column. Thanks to your recommendation and implemented in my application. Therefore I suggested to create a method that facilitates vs differentiate between visual column defined or created column.
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: XBROWSE Columnas Focalizada
Posted: Sun Apr 26, 2015 09:36 AM
ColFocused () INLINE :: aCols [:: SelectedCol (): nCreationOrder ]

This is not correct.
Because oBrw:aCols will not be in the same order as when created. The column objects in the aCols array keep getting shuffled.
Regards



G. N. Rao.

Hyderabad, India

Continue the discussion