Hello,
I added Buttons, to jump to a defined Position ( in % ) Row and Col of a Grid.
Useful, to jump to a Position working with big Tables.
Because each Project can have different Sizes, I used Percent of max Rows and Cols.
For my Test, I created a Browser with 20 Rows and 50 Cols
Jump to Row 50% :
( nSGet[2] = defined max Rows )
@ 53, 455 BTNBMP oBtn[5] ;
SIZE 32, 11 OF oDlg1 PIXEL 2007 ROUND ;
PROMPT "R 50%" ;
FONT oTxtfont ;
ACTION ( nRPos := INT(nSGet[2] * 0.5), oBrw2:nArrayAt := nRPos, ;
oSay2:Refresh(), oBrw2:Refresh() )
oBtn[5]:cTooltip := "Jump to Row ( 50% )"
oBtn[5]:SetColor( 128 )
Jump to Col 50% :
( nSGet[3] = defined max Cols )
@ 173, 455 BTNBMP oBtn[15] ;
SIZE 32, 11 OF oDlg1 PIXEL 2007 ROUND ;
PROMPT "C 50%" ;
FONT oTxtfont ;
ACTION ( nCPos := INT(nSGet[3] * 0.5), oBrw2:SelectCol(nCPos), ;
oSay4:Refresh(), oBrw2:Refresh() )
oBtn[15]:cTooltip := "Jump to Col ( 50% )
oBtn[15]:SetColor( 128 )
Jumping to a defined Row works fine
oBrw:nArrayAt := nRPos
But with a defined Col, the table doesn't move only HScroll works. Clicking on the HScroll-thumb, the table moves to the Position.
oBrw:SelectCol(nCPos)
The calculated Col-pos with 50% shows 25 and the HScroll-thumb is centered.
The Table only moves, clicking on the adjusted HScroll-thumb.