FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour How can I detect a selected row in xbrowse array.
Posts: 1387
Joined: Fri May 23, 2008 01:33 PM
How can I detect a selected row in xbrowse array.
Posted: Thu Nov 13, 2008 09:44 PM

Hi,

Using database Recno() is the selected row in xbrowse.

How can I detect a selected row in xbrowse array.

Thanks,

Regards,



Hakan ONEMLI



Harbour & MSVC 2022 & FWH 23.06
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Row-position in array
Posted: Thu Nov 13, 2008 09:54 PM
Hello,

Here is a sample :

oLbx4 := TXBrowse():New( oFld:aDialogs[1] )
oLbx4:nMarqueeStyle := MARQSTYLE_HIGHLROW
oLbx4:nColDividerStyle	 := LINESTYLE_BLACK
oLbx4:nRowDividerStyle := LINESTYLE_BLACK
oLbx4:nRecSelColor = 15512898 
oLbx4:bClrSelFocus = { || { 16777215, 15512898 } } 
oLbx4:bClrSel = { || { 16777215, 15512898 } } 

oLbx4:SetArray( aBRCOLOR )   // Array

oLbx4:aCols[ 1 ]:cHeader = Padr("No.", 3)
oLbx4:aCols[ 2 ]:cHeader = Padr("Text", 19)
oLbx4:lHScroll := .F.
oLbx4:lVScroll := .F.
oLbx4:lFooter := .T.

oLbx4:bLClicked := { | nRow, nCol | ROW_POS := oLbx4:nRowSel }

oLbx4:aCols[ 2 ]:AddResource("Black")
oLbx4:aCols[ 2 ]:AddResource("White")
oLbx4:aCols[ 2 ]:AddResource("Blue")
oLbx4:aCols[ 2 ]:AddResource("Green")
oLbx4:aCols[ 2 ]:AddResource("Red")
oLbx4:aCols[ 2 ]:AddResource("Yellow")
oLbx4:aCols[ 2 ]:AddResource("Magenta")
oLbx4:aCols[ 2 ]:bBmpData := {|| oLbx4:nArrayAt }
oLbx4:aCols[ 2 ]:bStrData := {|| oLbx4:aRow[2] }   

oLbx4:nArrayAt := ROW_POS
oLbx4:nRowSel := ROW_POS

oLbx4:nFooterHeight := 15

oLbx4:CreateFromResource( 130 )
Since 1995 ( the first release of FW 1.9 )

i work with FW.

If you have any questions about special functions, maybe i can help.
Posts: 1387
Joined: Fri May 23, 2008 01:33 PM
How can I detect a selected row in xbrowse array.
Posted: Fri Nov 14, 2008 08:20 AM

Thanks ukoenig,

I got my answer.

oLbx4:nArrayAt : Array Position of selected array.
oLbx4:nRowSel := Row position of current xbrowse windows. (Relative Position)

Regards,



Hakan ONEMLI



Harbour & MSVC 2022 & FWH 23.06

Continue the discussion