// ---------- The Array --------------
PRIVATE aBRCOLOR[8][2]
aBRCOLOR[1] := { "1", "Black" }
aBRCOLOR[2] := { "2", "White" }
aBRCOLOR[3] := { "3", "Blue" }
aBRCOLOR[4] := { "4", "Green" }
aBRCOLOR[5] := { "5", "Red" }
aBRCOLOR[6] := { "6", "Yellow" }
aBRCOLOR[7] := { "7", "Mag." }
aBRCOLOR[8] := { "8", "SELECT" }
// ------- Browser 1 --------------------
oLbx2 := TXBrowse():New( oFld:aDialogs[1] )
oLbx2:nMarqueeStyle := MARQSTYLE_HIGHLROW
oLbx2:nColDividerStyle := LINESTYLE_BLACK
oLbx2:nRowDividerStyle := LINESTYLE_BLACK
oLbx2:nRecSelColor = 15512898
oLbx2:bClrSelFocus = { || { 16777215, 15512898 } }
oLbx2:bClrSel = { || { 16777215, 15512898 } }
oLbx2:SetArray( aBRCOLOR )
oLbx2:aCols[ 1 ]:cHeader = Padr("No.", 3)
oLbx2:aCols[ 2 ]:cHeader = Padr("Start", 19)
oLbx2:lHScroll := .F.
oLbx2:lVScroll := .F.
oLbx2:lFooter := .T.
oLbx2:bLClicked := { | nRow, nCol | ROW_POS1 := oLbx2:nRowSel, ;
Function1() }
oLbx2:aCols[ 2 ]:AddResource("Black")
oLbx2:aCols[ 2 ]:AddResource("White")
oLbx2:aCols[ 2 ]:AddResource("Blue")
oLbx2:aCols[ 2 ]:AddResource("Green")
oLbx2:aCols[ 2 ]:AddResource("Red")
oLbx2:aCols[ 2 ]:AddResource("Yellow")
oLbx2:aCols[ 2 ]:AddResource("Magenta")
oLbx2:aCols[ 2 ]:bBmpData := {|| oLbx2:nArrayAt }
oLbx2:aCols[ 2 ]:bStrData := {|| oLbx2:aRow[2] }
oLbx2:nArrayAt := ROW_POS1
oLbx2:nRowSel := ROW_POS1
oLbx2:nFooterHeight := 15
oLbx2:CreateFromResource( 110 )
// ----- Browser 2 --------------
oLbx3 := TXBrowse():New( oFld:aDialogs[1] )
oLbx3:nMarqueeStyle := MARQSTYLE_HIGHLROW
oLbx3:nColDividerStyle := LINESTYLE_BLACK
oLbx3:nRowDividerStyle := LINESTYLE_BLACK
oLbx3:nRecSelColor = 15512898
oLbx3:bClrSelFocus = { || { 16777215, 15512898 } }
oLbx3:bClrSel = { || { 16777215, 15512898 } }
oLbx3:SetArray( aBRCOLOR )
oLbx3:aCols[ 1 ]:cHeader = Padr("No.", 3)
oLbx3:aCols[ 2 ]:cHeader = Padr("End", 19)
oLbx3:lHScroll := .F.
oLbx3:lVScroll := .F.
oLbx3:lFooter := .T.
oLbx3:bLClicked := { | nRow, nCol | ROW_POS2 := oLbx3:nRowSel, ;
Function2() }
oLbx3:aCols[ 2 ]:AddResource("Black")
oLbx3:aCols[ 2 ]:AddResource("White")
oLbx3:aCols[ 2 ]:AddResource("Blue")
oLbx3:aCols[ 2 ]:AddResource("Green")
oLbx3:aCols[ 2 ]:AddResource("Red")
oLbx3:aCols[ 2 ]:AddResource("Yellow")
oLbx3:aCols[ 2 ]:AddResource("Magenta")
oLbx3:aCols[ 2 ]:bBmpData := {|| oLbx3:nArrayAt }
oLbx3:aCols[ 2 ]:bStrData := {|| oLbx3:aRow[2] }
oLbx3:nArrayAt := ROW_POS2
oLbx3:nRowSel := ROW_POS2
oLbx3:nFooterHeight := 15
oLbx3:CreateFromResource( 120 )
vGetlist[3] := TXBrowse():New( oDlg )
vGetlist[3]:CreateFromResource( 101 )
oCol := vGetlist[3]:AddCol()
oCol:bStrData := { || dag->mecanic_01}
oCol:cHeader := planmec->naam01
oCol:nWidth := 100
oCol:lAllowSizing := .f.
oCol := vGetlist[3]:AddCol()
oCol:bStrData := { || dag->mecanic_02}
oCol:cHeader := planmec->naam02
oCol:nWidth := 100
oCol:lAllowSizing := .f.
vGetlist[3]:lAllowRowSizing := .f.
vGetlist[3]:nRowHeight := 20
vGetlist[3]:nMarqueeStyle := MARQSTYLE_HIGHLCELL
vGetlist[3]:nColDividerStyle := LINESTYLE_LIGHTGRAY
vGetlist[3]:nRowDividerStyle := LINESTYLE_LIGHTGRAY
vGetlist[4] := TXBrowse():New( oDlg )
vGetlist[4]:CreateFromResource( 102 )
sele todo
oCol := vGetlist[4]:AddCol()
oCol:bStrData := { || transform(todo->plaatnr,"@R !!!-!!!")}
oCol:cHeader := 'Plaat'
oCol:nWidth := 60
oCol:lAllowSizing := .f.
oCol := vGetlist[4]:AddCol()
oCol:bStrData := { || todo->todo_01}
oCol:cHeader := 'Werk'
oCol:nWidth := 200
oCol:lAllowSizing := .f.
vGetlist[4]:lAllowRowSizing := .f.
vGetlist[4]:nRowHeight := 20
vGetlist[4]:nMarqueeStyle := MARQSTYLE_HIGHLROW
vGetlist[4]:nColDividerStyle := LINESTYLE_LIGHTGRAY
vGetlist[4]:nRowDividerStyle := LINESTYLE_LIGHTGRAY
ACTIVATE DIALOG oDlg CENTERED
// --------------- 1. browser ------------
sele dag
vGetlist[3] := TXBrowse():New( oDlg )
vGetlist[3]:CreateFromResource( 101 )
oCol := vGetlist[3]:AddCol()
oCol:bStrData := { || dag->mecanic_01}
oCol:cHeader := planmec->naam01
oCol:nWidth := 100
oCol:lAllowSizing := .f.
oCol := vGetlist[3]:AddCol()
oCol:bStrData := { || dag->mecanic_02}
oCol:cHeader := planmec->naam02
oCol:nWidth := 100
oCol:lAllowSizing := .f.
vGetlist[3]:lAllowRowSizing := .f.
vGetlist[3]:nRowHeight := 20
vGetlist[3]:nMarqueeStyle := MARQSTYLE_HIGHLCELL
vGetlist[3]:nColDividerStyle := LINESTYLE_LIGHTGRAY
vGetlist[3]:nRowDividerStyle := LINESTYLE_LIGHTGRAY
// -------------- 2. Browser ------------------------
sele todo // !!!!!!!
vGetlist[4] := TXBrowse():New( oDlg )
vGetlist[4]:CreateFromResource( 102 )
// sele todo !!! Wrong position
// ---------------------------------
oCol := vGetlist[4]:AddCol()
oCol:bStrData := { || transform(todo->plaatnr,"@R !!!-!!!")}
oCol:cHeader := 'Plaat'
oCol:nWidth := 60
oCol:lAllowSizing := .f.
oCol := vGetlist[4]:AddCol()
oCol:bStrData := { || todo->todo_01}
oCol:cHeader := 'Werk'
oCol:nWidth := 200
oCol:lAllowSizing := .f.
vGetlist[4]:lAllowRowSizing := .f.
vGetlist[4]:nRowHeight := 20
vGetlist[4]:nMarqueeStyle := MARQSTYLE_HIGHLROW
vGetlist[4]:nColDividerStyle := LINESTYLE_LIGHTGRAY
vGetlist[4]:nRowDividerStyle := LINESTYLE_LIGHTGRAY
// -------------------------------------
// Tested i changed oBrw1 and oBrw2 in oBrw[1] and oBrw[2] !!!!
DBSELECTAREA(1)
oBrw[1] := TXBrowse():New( oDlg )
oBrw[1]:nMarqueeStyle := MARQSTYLE_HIGHLROW
oBrw[1]:nColDividerStyle := LINESTYLE_BLACK
oBrw[1]:nRowDividerStyle := LINESTYLE_BLACK
oBrw[1]:nColDividerStyle := LINESTYLE_BLACK
oBrw[1]:nRowDividerStyle := LINESTYLE_BLACK
oBrw[1]:l2007 := .T.
oBrw[1]:bClrGrad := { | lInvert | If( ! lInvert, ;
{ { 0.50,16294002,15263976 }, ;
{ 0.50,15263976,16294002 } }, ;
{ { 0.50,8388608,15263976 }, ;
{ 0.50,15263976,8388608 } } ) }
oBrw[1]:bClrHeader := { || { 0, 0 } }
oBrw[1]:bClrFooter := { || { 0, 0 } }
oBrw[1]:bClrSelFocus = { || { 16777215,16288063 } }
oBrw[1]:nRecSelColor = 15638325
oBrw[1]:bClrSel = { || { 16777215,16288063 } }
oBrw[1]:lHScroll := .T.
oBrw[1]:lVScroll := .T.
oBrw[1]:lFooter := .T.
oBrw[1]:nHeaderHeight := 35
oBrw[1]:nFooterHeight := 35
oCol := oBrw[1]:AddCol()
oCol:AddResource( "CLIP" )
oCol:AddResource( "star" )
oCol:bLClickHeader = { | nMRow, nMCol, nFlags, Self | ;
If( ::nHeadBmpNo == 2, ::nHeadBmpNo := 1, ;
::nHeadBmpNo := 2 ), ::oLbx30:Refresh() }
oCol:cHeader := "CLIP"
oCol:nHeadBmpNo := 1
oCol:nHeadBmpAlign := AL_RIGHT
oCol := oBrw[1]:AddCol()
oCol:bStrData := { || (1)->First}
oCol:cHeader := "First"
oCol:cFooter := "First"
oCol := oBrw[1]:AddCol()
oCol:bStrData := { || (1)->Last}
oCol:cHeader := "Last"
oCol:cFooter := "Last"
oBrw[1]:oFont := oBrwFont
oBrw[1]:nRowHeight := 30
oBrw[1]:SetRDD()
oBrw[1]:CreateFromResource( 110 )
// ------------- Browser 2 -------------------
DBSELECTAREA(2)
oBrw[2] := TXBrowse():New( oDlg )
oBrw[2]:nMarqueeStyle := MARQSTYLE_HIGHLROW
oBrw[2]:nColDividerStyle := LINESTYLE_BLACK
oBrw[2]:nRowDividerStyle := LINESTYLE_BLACK
oBrw[2]:nColDividerStyle := LINESTYLE_BLACK
oBrw[2]:nRowDividerStyle := LINESTYLE_BLACK
oBrw[2]:l2007 := .T.
oBrw[2]:bClrGrad := { | lInvert | If( ! lInvert, ;
{ { 0.50,16294002,15263976 }, ;
{ 0.50,15263976,16294002 } }, ;
{ { 0.50,8388608,15263976 }, ;
{ 0.50,15263976,8388608 } } ) }
oBrw[2]:bClrHeader := { || { 0, 0 } }
oBrw[2]:bClrFooter := { || { 0, 0 } }
oBrw[2]:bClrSelFocus = { || { 16777215,16288063 } }
oBrw[2]:nRecSelColor = 15638325
oBrw[2]:bClrSel = { || { 16777215,16288063 } }
oBrw[2]:lHScroll := .T.
oBrw[2]:lVScroll := .T.
oBrw[2]:lFooter := .T.
oBrw[2]:nHeaderHeight := 35
oBrw[2]:nFooterHeight := 35
oCol := oBrw[2]:AddCol()
oCol:bStrData := { || (2)->Concepto}
oCol:cHeader := "Last"
oCol:cFooter := "Last"
oCol := oBrw[2]:AddCol()
oCol:bStrData := { || (2)->Codigo}
oCol:cHeader := "City"
oCol:cFooter := "City"
oBrw[2]:oFont := oBrwFont
oBrw[2]:nRowHeight := 30
oBrw[2]:SetRDD()
oBrw[2]:CreateFromResource( 120 )
// ----- Brush-Background and Header / Footer-Font ---------
DEFINE BRUSH oBrush RESOURCE "BRICK"
oBrw[1]:SetBackGround( oBrush )
oBrw[2]:SetBackGround( oBrush )
RELEASE BRUSH oBrush
oBrw[1]:Refresh()
oBrw[2]:Refresh()
i := 1
FOR i := 1 TO LEN( oBrw[1]:aCols )
WITH OBJECT oBrw[1]:aCols[i]
oBrw[1]:aCols[i]:oHeaderFont := oHeadFont
oBrw[1]:aCols[i]:bClrHeader := { || { 0,16294002 } }
oBrw[1]:aCols[i]:oFooterFont := oFootFont
oBrw[1]:aCols[i]:bClrFooter := { || { 0,8388608 } }
END
NEXT
i := 1
FOR i := 1 TO LEN( oBrw[2]:aCols )
WITH OBJECT oBrw[2]:aCols[i]
oBrw[2]:aCols[i]:oHeaderFont := oHeadFont
oBrw[2]:aCols[i]:bClrHeader := { || { 0,16294002 } }
oBrw[2]:aCols[i]:oFooterFont := oFootFont
oBrw[2]:aCols[i]:bClrFooter := { || { 0,8388608 } }
END
NEXT
vGetlist[3]:setrdd()
oBrw[2]:SetRDD()
Error description: Error BASE/1004 Message not found: TXBROWSE:RDDSETDEFAULT
Stack Calls
===========
Called from: tobject.prg => TXBROWSE:ERROR(172)
Called from: tobject.prg => TXBROWSE:MSGNOTFOUND(205)
Called from: tobject.prg => TXBROWSE:RDDSETDEFAULT(0)
#include "FiveWin.ch"
#include "XBrowse.ch"
function Main()
local oWnd, oBrw, oCol
USE Customer
DEFINE WINDOW oWnd
@ 0, 0 XBROWSE oBrw OF oWnd ALIAS "Customer"
oCol = oBrw:AddCol()
oCol:bStrData = { || Customer->First }
oCol:cHeader = "First"
oBrw:SetRdd()
oBrw:CreateFromCode()
oWnd:oClient = oBrw
ACTIVATE WINDOW oWnd
return nil
Stack Calls
===========
Called from: tobject.prg => TXBROWSE:ERROR(172)
Called from: tobject.prg => TXBROWSE:MSGNOTFOUND(205)
Called from: tobject.prg => TXBROWSE:RDDSETDEFAULT(0)
...
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: Google [Bot] and 89 guests