oCol:bToolTip := { | brw,r,c,f,oMouseCol,nMouseRow| MyColToolTip( brw,r,c,f,oMouseCol,nMouseRow ) }
...
...
function MyColToolTip( oBrw, r, c, f, oMouseCol, nMouseRow )
local uVal, nRow, nCol
nRow := oBrw:nArrayAt + nMouseRow - oBrw:nRowSel
nCol := oMouseCol:nCreationOrder
uVal := oBrw:nArrayData[ nRow, nCol ]
return cValToChar( uVal )
joseluisysturiz wrote:Hi, I need something similar but to do so in all cells and is to browse my oQry or this is just to browse with array, try as in the example but it gives me error "UVAL: = oBrw: nArrayData [nRow, nCol] "/ Message not found: TXBrowse: NARRAYDATA, thanks, greetings ... using google translator...
oCol:bToolTip := { | brw,r,c,f,oMouseCol,nMouseRow| MyColToolTip( brw,r,c,f,oMouseCol,nMouseRow ) }
...
...
function MyColToolTip( oBrw, r, c, f, oMouseCol, nMouseRow )
local uBm, uVal
if nMouseRow != oBrw:nRowSel
uBm := oBrw:BookMark
Eval( oBrw:bSkip, nMouseRow - oBrw:nRowSel )
uVal := oMouseCol:Value
oBrw:BookMark := uBm
else
uVal := oMouseCol:Value
endif
return cValToChar( uVal )
Error occurred at: 23-02-2015, 18:00:41
Error description: Error BASE/1004 Message not found: TXBROWSE:NARRAYDATA
Stack Calls
===========
Called from: .\source\function\HARBOUR.PRG => _CLSSETERROR( 244 )
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:NARRAYDATA( 8313 )
Called from: source\Ptabell.prg => MYCOLTOOLTIP( 332 )
Called from: source\Ptabell.prg => (b)PTABELLONE( 187 )
Path and name: D:\COUNTRY\NEWCONT32\Wcont32.Exe (32 bits)
Size: 2,646,016 bytes
Time from start: 0 hours 0 mins 13 secs
Error occurred at: 23/02/2015, 11:52:26
Error description: Error BASE/1082 Argument error: -
Args:
[ 1] = U
[ 2] = N 2
Stack Calls
===========
Called from: D:\COUNTR~1\NEWCON~1\wcont32.prg => MYCOLTOOLTIP(574)
Called from: D:\COUNTR~1\NEWCON~1\wcont32.prg => (b)COMPROBANTE(461)
Called from: XBROWSE.PRG => TXBROWSE:MOUSEMOVE(3403)
Called from: => TWINDOW:HANDLEEVENT(0)
Called from: CONTROL.PRG => TCONTROL:HANDLEEVENT(1490)
Called from: XBROWSE.PRG => TXBROWSE:HANDLEEVENT(10762)
Called from: .\source\classes\WINDOW.PRG => _FWH(3391)
Called from: => WINRUN(0)
Called from: .\source\classes\WINDOW.PRG => TMDIFRAME:ACTIVATE(976)
Called from: D:\COUNTR~1\NEWCON~1\wcont32.prg => MAIN(192)
oCol = oBrw:AddCol()
oCol:bStrData = { || (cAlias)->NOMBRE }
oCol:cHeader = "DESCRIPCION DE LA CUENTA"
oCol:nEditType = 0 //no editable
oCol:bToolTip := { | oBrw,r,c,f,oMouseCol,nMouseRow| MyColToolTip( oBrw,r,c,f,oMouseCol,nMouseRow ) }
//----------------------------------------------------------
Function MyColToolTip( oBrw, r, c, f, oMouseCol, nMouseRow )
local uBm, uVal
if nMouseRow != oBrw:nRowSel
uBm := oBrw:BookMark
Eval( oBrw:bSkip, nMouseRow - oBrw:nRowSel ) //here (variable nMouseRow do not exists)
uVal := oMouseCol:Value
oBrw:BookMark := uBm
else
uVal := oMouseCol:Value
endif
return cValToChar( uVal )
function TestTip()
local oDlg, oFont, oBrw
USE CUSTOMER
DEFINE DIALOG oDlg SIZE 600,500 PIXEL
@ 10,10 XBROWSE oBrw SIZE -10,-10 PIXEL OF oDlg ;
DATASOURCE "CUSTOMER" AUTOCOLS ;
CELL LINES NOBORDER
oBrw:bToolTips := ;
{ | oBrw,r,c,f,oMouseCol,nMouseRow| MyColToolTip( oBrw,r,c,f,oMouseCol,nMouseRow ) }
oBrw:CreateFromCode()
ACTIVATE DIALOG oDlg CENTERED
return nil
//----------------------------------------------------------
Function MyColToolTip( oBrw, r, c, f, oMouseCol, nMouseRow )
local uBm, uVal
if nMouseRow != oBrw:nRowSel
uBm := oBrw:BookMark
Eval( oBrw:bSkip, nMouseRow - oBrw:nRowSel )
uVal := oMouseCol:Value
oBrw:BookMark := uBm
else
uVal := oMouseCol:Value
endif
return cValToChar( uVal )
function TestTip()
local oDlg, oFont, oBrw
USE CUSTOMER
DEFINE DIALOG oDlg SIZE 600,500 PIXEL
@ 10,10 XBROWSE oBrw SIZE -10,-10 PIXEL OF oDlg ;
DATASOURCE "CUSTOMER" AUTOCOLS ;
CELL LINES NOBORDER
oBrw:bToolTips := ;
{ | oBrw,r,c,f,oMouseCol,nMouseRow| MyColToolTip( oBrw,r,c,f,oMouseCol,nMouseRow ) }
oBrw:CreateFromCode()
ACTIVATE DIALOG oDlg CENTERED
return nil
//----------------------------------------------------------
Function MyColToolTip( oBrw, r, c, f, oMouseCol, nMouseRow )
local uBm, uVal
if nMouseRow != oBrw:nRowSel
uBm := oBrw:BookMark
Eval( oBrw:bSkip, nMouseRow - oBrw:nRowSel )
uVal := oMouseCol:Value
oBrw:BookMark := uBm
else
uVal := oMouseCol:Value
endif
return cValToChar( uVal )
Thanks for your time and patience, but I have not been able to make it work. Maybe it's my 1204 version .
FranciscoA wrote:Thanks for your time and patience, but I have not been able to make it work. Maybe it's my 1204 version .
Best regards.
Function MyColToolTip( oBrw, r, c, f, oMouseCol, nMouseRow )
local uBm, uVal
// for older versions
nMouseRow := oBrw:MouseRowPos( r )
oMouseCol := oBrw:MouseColPos( c )
oMouseCol := oBrw:ColAtPos( oMouseCol )
//
if nMouseRow != oBrw:nRowSel
uBm := oBrw:BookMark
Eval( oBrw:bSkip, nMouseRow - oBrw:nRowSel ) //here (variable nMouseRow do not exists)
uVal := oMouseCol:Value
oBrw:BookMark := uBm
else
uVal := oMouseCol:Value
endif
return cValToChar( uVal )
oBrow:bToolTips := { | oBrow, r, c, f, oMouseCol, nMouseRow| MyColToolTip( oBrow, r, c, f, oMouseCol, nMouseRow ) }
function MyColToolTip( oBrw, r, c, f, oMouseCol, nMouseRow )
local uBm, uVal
if nMouseRow != oBrw:nRowSel
uBm := oBrw:BookMark
Eval( oBrw:bSkip, nMouseRow - oBrw:nRowSel )
uVal := oMouseCol:Value
oBrw:BookMark := uBm
else
uVal := oMouseCol:Value
endif
return cValToChar( uVal )
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 83 guests