How can I detect a selected row in xbrowse array.

How can I detect a selected row in xbrowse array.

Postby Horizon » Thu Nov 13, 2008 9: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.04
Horizon
 
Posts: 1322
Joined: Fri May 23, 2008 1:33 pm

Row-position in array

Postby ukoenig » Thu Nov 13, 2008 9:54 pm

Hello,

Here is a sample :

Code: Select all  Expand view

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.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Postby Horizon » Fri Nov 14, 2008 8: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.04
Horizon
 
Posts: 1322
Joined: Fri May 23, 2008 1:33 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 81 guests