Alaska Software Inc. - How to programmatically click a line in XbpBrowse?
Username: Password:
AuthorTopic: How to programmatically click a line in XbpBrowse?
Itai Ben-ArtziHow to programmatically click a line in XbpBrowse?
on Wed, 08 Dec 2021 16:05:57 -0800
Is there a way to PostAppEvent that moves the cursor of XbpBrowse to
specific row in the visible area?

This is not working:
PostAppEvent( xbeBRW_ItemMarked, aRowCol, nil, @oBrw )
oBrw:forceStable()

Alternatively: How to retrieve a XbpCellGroup object from a specific
position of XbpBrowse (e.g. row 8, col 3) when the cursor is not in
the visible area of the browser?

Many thanks,
-Itai
Jim LeeRe: How to programmatically click a line in XbpBrowse?
on Fri, 10 Dec 2021 02:14:06 +0100
hi

you can use

   GOTO(mRec)
    display on 3th. ROW
   oBrowse:ROWPOS := 3

to get Value of CELL
   xValue := oBrowse:GetColumn(nCol):DataArea:getCell(nRow)
Itai Ben-ArtziRe: How to programmatically click a line in XbpBrowse?
on Thu, 09 Dec 2021 22:38:00 -0800
Thank you, Jim, but your solution does not work:
The browser shows 20 lines, the cursor is on row 3 of 200 (not
currently visible).  The user click line 7 (out of 20) that displays
row 98.  Where can I find the row that was clicked?  The only solution
I've found thus far is to use the old navigation mode
(::navigationMode := XBPBRW_NAVIGATION_1XCOMPATIBLE so the cursor is
always in the visible area) and use the ::navigate() method.   Is
there a solution for this without using the old-style navigation mode?

Many thanks,
-Itai
Itai Ben-ArtziRe: How to programmatically click a line in XbpBrowse?
on Thu, 09 Dec 2021 22:59:20 -0800
Thank you jim.
>to get Value of CELL
>   xValue := oBrowse:GetColumn(nCol):DataArea:getCell(nRow)
>
Is there a way to retrieve the XbpCellGroup object itself, not just
the value of the cell?
Carlos Antonio BelingRe: How to programmatically click a line in XbpBrowse?
on Fri, 10 Dec 2021 12:40:12 -0300
Hi Itai.
Good day.
Did you try to see if to use the event  xbeCELLGR_ItemSelected for to 
retrieve the (Alias)->(recno()) is feaseable?

Fraternally
Beling

Em 08/12/2021 21:05, Itai Ben-Artzi escreveu:
> Is there a way to PostAppEvent that moves the cursor of XbpBrowse to
> specific row in the visible area?
> 
> This is not working:
> PostAppEvent( xbeBRW_ItemMarked, aRowCol, nil, @oBrw )
> oBrw:forceStable()
> 
> Alternatively: How to retrieve a XbpCellGroup object from a specific
> position of XbpBrowse (e.g. row 8, col 3) when the cursor is not in
> the visible area of the browser?
> 
> Many thanks,
> -Itai
>
Itai Ben-ArtziRe: How to programmatically click a line in XbpBrowse?
on Fri, 10 Dec 2021 11:39:53 -0800
Beling.
I did not try this event because:
1. This event is related to the XbpCellGroup object, but there is no
way (which I know of) to retrieve the XbpCellGroup object from the
known coordinates (row and column) of the browser object.

2. This event is a double-click while I would like to post a single
click event.

Thank you for looking up this issue.
  
-Itai
Jim LeeRe: How to programmatically click a line in XbpBrowse?
on Sat, 11 Dec 2021 04:00:24 +0100
hi,

seem you want to get :phyPosBlock or :posBlock ( -> Position of vertcal
Scrollbar )

---

there is a :cellFromPos()
search for CLASS XbpGetColumn() how to use :cellFromPos()



---
Diese E-Mail wurde von AVG auf Viren geprüft.
http://www.avg.com
Itai Ben-ArtziRe: How to programmatically click a line in XbpBrowse?
on Sat, 11 Dec 2021 21:44:27 -0800
JJim
:cellFromPos() return the row (which I already have), not the cell object.
Jim LeeRe: How to programmatically click a line in XbpBrowse?
on Mon, 13 Dec 2021 04:59:36 +0100
hi,

you are right that cellFromPos() does return nRowPos for XbpCellGroup()
but XbpMultiCellGroup():cellFromPos() will give you {nRowPos, nColPos}

CLASS DDCal FROM XBPMULTICELLGROUP

   ::aRowCol := ::oKal:cellFromPos( aPos )
   ccSUBJECT := ::oKal:GetCell( ::aRowCol[ 1 ], ::aRowCol[ 2 ] )



---
Diese E-Mail wurde von AVG auf Viren geprüft.
http://www.avg.com
Itai Ben-ArtziRe: How to programmatically click a line in XbpBrowse?
on Mon, 13 Dec 2021 14:36:42 -0800
Jim,
All is well if/when a memvar referenced the XbpCellGroup (from pos y,
x).  But I do not know how to retrieve that cell from the XbpBrows()
object and Y, X position.
It seems xBase++ let you go up from cell to browser, but not down from
browser to cell.
For clarity, I'd like to retrieve the Y:X cell object from XbpBrowse
(e.g. Row=4, Column=5).
I hope Alaska will add such a method to the xBpBrowse() object. 

-Itai
Carlos Antonio BelingRe: How to programmatically click a line in XbpBrowse?
on Sat, 11 Dec 2021 13:18:42 -0300
Good day Itai.
The example of what I tried to say  can to be seen in 
..\Xbase++\source\samples\solution\xbpget\GetCol.prg, method _lbDown.

Fraternally
Beling

Em 10/12/2021 16:39, Itai Ben-Artzi escreveu:
> Beling.
> I did not try this event because:
> 1. This event is related to the XbpCellGroup object, but there is no
> way (which I know of) to retrieve the XbpCellGroup object from the
> known coordinates (row and column) of the browser object.
> 
> 2. This event is a double-click while I would like to post a single
> click event.
> 
> Thank you for looking up this issue.
>    
> -Itai
>
Itai Ben-ArtziRe: How to programmatically click a line in XbpBrowse?
on Sat, 11 Dec 2021 21:49:59 -0800
Carlos,
The task is to programatically post lbdown on a specific cell, not to
handle this event when generated by the user.
Jim LeeRe: How to programmatically click a line in XbpBrowse?
on Tue, 14 Dec 2021 01:25:39 +0100
> This is not working:
> PostAppEvent( xbeBRW_ItemMarked, aRowCol, nil, @oBrw )
> oBrw:forceStable()

       CASE mp1 == xbeK_RIGHT
          IF ::CursorMode == XBPBRW_CURSOR_CELL
             PostAppEvent ( xbeBRW_Navigate, XBPBRW_Navigate_NextCol,,
self )
          ELSE
             PostAppEvent ( xbeBRW_Pan, XBPBRW_Pan_Right, NIL, self )
          ENDIF

> Alternatively: How to retrieve a XbpCellGroup object from a specific
> position of XbpBrowse (e.g. row 8, col 3) when the cursor is not in
> the visible area of the browser?

   nCol := 3
   nRow := 8
   Msgbox( VAR2CHAR( oBrowse:GetColumn(nCol):dataArea:Getcell(nRow) ) )



---
Diese E-Mail wurde von AVG auf Viren geprüft.
http://www.avg.com
Itai Ben-ArtziRe: How to programmatically click a line in XbpBrowse?
on Tue, 14 Dec 2021 14:10:00 -0800
Jim,
Thank you for looking up this issue.
Because the cursor is far up (or far down) from the visible rows,
navigation up or down or right or left is useless.
It seems xBase++ let us go up from cell to browser, but not down from
browser to cell (we can only go down to a column, but not to a
specific cell).
I hope Alaska will add a GetCellObject method to the xBpBrowse()
class.

-Itai
Jim LeeRe: How to programmatically click a line in XbpBrowse?
on Wed, 15 Dec 2021 02:24:16 +0100
hi,

didi you use XBPBRW_CURSOR_CELL ?

you can not navigate to Cell when use  XBPBRW_CURSOR_ROW



---
Diese E-Mail wurde von AVG auf Viren geprüft.
http://www.avg.com
Itai Ben-ArtziRe: How to programmatically click a line in XbpBrowse?
on Wed, 15 Dec 2021 11:27:13 -0800
Jim,
The XBPBRW_CURSOR_CELL only affect the type of the cursor and has
nothing to do with event posting or navigation.
Carlos Antonio BelingRe: How to programmatically click a line in XbpBrowse?
on Wed, 15 Dec 2021 12:08:42 -0300
Hi Itai:
good day.
Sorry to bother you again.
I think that the only way to accomplish what you want to do is using the 
slot :skipBlock() for to skip x records untill you reach the desired 
line, thereafter to use themethod oBrow:forcestable() and then moving 
the cursor right or left to the cell you want.

Fraternally
Beling

Em 14/12/2021 19:10, Itai Ben-Artzi escreveu:
> Jim,
> Thank you for looking up this issue.
> Because the cursor is far up (or far down) from the visible rows,
> navigation up or down or right or left is useless.
> It seems xBase++ let us go up from cell to browser, but not down from
> browser to cell (we can only go down to a column, but not to a
> specific cell).
> I hope Alaska will add a GetCellObject method to the xBpBrowse()
> class.
> 
> -Itai
>
Itai Ben-ArtziRe: How to programmatically click a line in XbpBrowse?
on Wed, 15 Dec 2021 11:41:58 -0800
Beling,
It cannot work because there is no way to determine how the current
cursor position is related to the current rows displayed (is it up the
displayed rows or down).

When Alaska deviated from the old XBPBRW_NAVIGATION_1XCOMPATIBLE, they
forgot to add a method or two to programatically determine cells and
rows in the displayed area.

I hope they will soon fix this deficiency. 
-Itai