///////////////////////////////////////////////////////////////// BRW /////////////////////////////////////////////////
aVelden := { ;
{ "ID" , "Id" ,nil, 90 }, ;
{ "orgfoto" , "Coverfoto" ,nil, 100 }, ;
{ "naam" , "Benaming",nil, 120 }, ;
{ "pagina" , "Pag" ,nil, 40 }, ;
{ "reflev" , "RefLev" ,nil, 70 }, ;
{ "shoptrad" , "Shop" ,nil, 35 }, ;
{ "zoeken" , "Zoekterm",nil, 15 }, ;
{ "fabrikan" , "Merk" ,nil, 50 }, ;
{ "Online" , "Onl" ,nil, 30 }, ;
{ "picfound" , "Foto" ,nil, 30 }, ;
{ "kleur" , "Kleur" ,nil, 70 }, ;
{ "size" , "Maat" ,nil, 70 }, ;
{ "memotxt" , "Memotxt" ,nil, 60 }, ;
{ "selected" , "Sel" ,nil, 30 }, ;
{ "aankoop" , "Aank" ,nil, 45 }, ;
{ "Prijs" , "Prijs" ,nil, 45 }, ;
{ "Korting" , "Kort" ,nil, 45 }, ;
{ "stockid" , "Sto" ,nil, 30 }, ;
{ "layover" , "Lay" ,nil, 30 }, ;
{ "uitass" , "Uit" ,nil, 30 }, ;
{ "Wissen" , "Wis" ,nil, 30 } }
/*
{ "colaantal", "Col" ,nil, 25 }, ;
{ "colaanatt", "Att" ,nil, 25 }, ;
{ "colaanpic", "Pic" ,nil, 25 }, ;
*/
/*
AEval( aVelden, { | a | AAdd( aFields, a[ 1 ] ),;
AAdd( aHeaders, a[ 2 ] ),;
AAdd( aSizes, a[ 3 ] ) } )
*/
//lFastDraw = .T.
@ 250,10 XBROWSE oBrw SIZE 1200,250 ;
PIXEL OF oWnd font oFont3;
DATASOURCE "nofoto" ;
COLUMNS aVelden;
CELL LINES NOBORDER FASTEDIT
oBrw:nEditTypes = EDIT_GET
oBrw:SetChecks()
// oBrw:lRowBox = .t.
// Color Header
oBrw:memotxt:bClrHeader := { || { CLR_GREEN, 155 } }
oBrw:kleur:bClrHeader := { || { CLR_GREEN, 155 } }
oBrw:onl:bClrHeader := { || { CLR_GREEN, 155 } }
oBrw:Sel:bClrHeader := { || { CLR_GREEN, 155 } }
oBrw:Shop:bClrHeader := { || { CLR_GREEN, 155 } }
oBrw:foto:nFooterType := AGGR_COUNT
oBrw:foto:bSumCondition := { || nofoto->picfound }
oBrw:Shop:nFooterType := AGGR_COUNT
oBrw:Shop:bSumCondition := { || !nofoto->shoptrad }
// Action to header
oBrw:memotxt:bLClickHeader := { |r,c,f,oCol| FRichedit(oCol:Value),oBrw:refresh() }
//oBrw:memotxt:bLClickHeader := { |r,c,f,oCol| edit_memo(oCol:Value),oBrw:refresh() }
oBrw:kleur:bLClickHeader := { |r,c,f,oCol| edit_kleur(oCol:Value),oBrw:refresh() }
oBrw:onl:bLClickHeader := { |r,c,f,oCol| mark_online(oCol:Value),oBrw:gotop(),oBrw:setfocus(),oBrw:refresh() }
oBrw:Sel:bLClickHeader := { |r,c,f,oCol| mark_selection(oCol:Value),oBrw:refresh() }
oBrw:Shop:bLClickHeader := { |r,c,f,oCol| mark_shop_selection(oCol:Value),oBrw:refresh() }
oBrw:bRClickHeaders := { || XbrColSelector( oBrw ) } // Kies welke velden tezien zijn
// oBrw[1]:bRClickHeaders := { || XbrColSelector( oBrw[1] ) }
// oBrw[1]:bRClicked := { || XbrShowSizes( oBrw[1] ) }
//don't forget
//ReleaseDC(hDC) after oDlg:End()
WITH OBJECT oBrw
// :lEditMode := .T.
:lFooter := .t.
:bRecSelHeader := { || "" }
:bRecSelData := { |o| o:KeyNo }
:bRecSelFooter := { |o| o:nLen }
:oRecSelFont := oFont3 // optional
:nRecSelWidth := "99999" // required size
:lHScroll := .F.
//:picfound:SetCheck()
//:nStretchCol := 3
// :bChange := { || SET_SCOPE(oBrw2),('foto')->(DBGOTOP()),oBrw2:Refresh(),oBrw4:gotop(),oBrw4:Refresh(),oImage:Refresh(),oImage2:Refresh(),Obrw:refresh(),Oget:refresh(),oGet2:refresh() }
// :bChange := { || scopetimer(oBrw),('foto')->(DBGOTOP()),oBrw2:Refresh(),oBrw4:gotop(),oBrw4:Refresh(),oImage:Refresh(),oImage2:Refresh(),Obrw:refresh(),Oget:refresh(),oGet2:refresh() }
//:bChange := { || SET_SCOPE(oBrw2) }
//:bChange := { || nSecs := SECONDS(), scope_nofoto(), oBrw2:refresh() }
:bChange := { || nSecs := SECONDS(), oBrwEan:gotop(), oBrwEan:refresh() , scope_nofoto(), oBrw2:refresh() }
// :bChange := { |nRow,nCol,oCol,nKey| oImage:Refresh() }
// :bKeyDown := { |nKey| If( nKey == VK_DELETE, (oBrw:cAlias)->( BrwDelete( oBrw ) ), nil ) }
:bKeyDown := { |nKey| If( nKey == VK_DELETE, (oBrw:cAlias)->( BrwDelselect( oBrw ) ), nil ) }
:lMultiSelect := .T.
oBrw:kleur:bToolTip := { | oBrw,r,c,f,oMouseCol,nMouseRow| MyColToolTip( oBrw,r,c,f,oMouseCol,nMouseRow ) }
oBrw:memotxt:bToolTip := { | oBrw,r,c,f,oMouseCol,nMouseRow| MyColToolTip( oBrw,r,c,f,oMouseCol,nMouseRow ) }
oBrw:Pag:bClrStd := { || IF( nofoto->shoptrad , { CLR_BLACK,CLR_WHITE } , { CLR_WHITE ,CLR_HRED} ) }
oBrw:Prijs:bClrStd := { || IF( nofoto->prijs > 0 , { CLR_BLACK,CLR_WHITE } , { CLR_WHITE ,CLR_HRED} ) }
WITH OBJECT:shop
:nFooterType := AGGR_COUNT
:bSumCondition := { || !nofoto->shoptrad }
END
WITH OBJECT:prijs
:nFooterType := AGGR_COUNT
:bSumCondition := { || nofoto->prijs = 0 }
END
WITH OBJECT:kleur
:nEditType := EDIT_GET_BUTTON
:bClrSel := { || { CLR_BLACK, CLR_HGRAY }}
:bEditBlock := { |r,c,oCol| fotoSelect( oCol:Value ) }
// :bOnChange := { |oCol,uOldVal| oBrw:kleur:VarPut( tempfoto->foto ) }
ENDWITH
/*
WITH OBJECT:pos
:bOnChange := { |oCol,uOldVal| oBrw:gotop(), oBrw:refresh() }
ENDWITH
*/
WITH OBJECT :oCol( 1 )
:nEditType := EDIT_GET_BUTTON
:bClrSel := { || { CLR_BLACK, CLR_YELLOW }}
:bEditBlock := { |r,c,oCol| LookupArt( oCol:Value ) }
//:bOnChange := { |oCol,uOldVal| oData:FieldValue:VarPut( PRD->VELD ) }
ENDWITH
WITH OBJECT :oCol( 2 )
:nEditType := EDIT_GET_BUTTON
:bClrSel := { || { CLR_BLACK, CLR_YELLOW }}
:bEditBlock := { |r,c,oCol| LookupPic( oCol:Value ) }
//:bOnChange := { |oCol,uOldVal| oData:FieldValue:VarPut( PRD->VELD ) }
ENDWITH
WITH OBJECT:memotxt
:nEditType := EDIT_GET
:bClrSel := { || { CLR_BLACK, CLR_YELLOW }}
:bEditBlock := { |r,c,oCol| edit_memo( oCol:Value ) }
//:bOnChange := { |oCol,uOldVal| oData:FieldValue:VarPut( PRD->VELD ) }
ENDWITH
/*
WITH OBJECT :pag2
:uBarGetVal := uValBlank( :Value )
:nEditType := EDIT_GET_LISTBOX
:aEditListTxt := aPaginas
:aBarGetList:= aPaginas
ENDWITH
WITH OBJECT :pag3
:uBarGetVal := uValBlank( :Value )
:nEditType := EDIT_GET_LISTBOX
:aEditListTxt := aPaginas
:aBarGetList:= aPaginas
ENDWITH
*/
WITH OBJECT :merk
:uBarGetVal := uValBlank( :Value )
:nEditType := EDIT_GET_LISTBOX
:aEditListTxt := aLeveranciers
//:bOnChange := { |oCol, uOldVal| OnGroepChange( oBrw, oCol, uOldVal ) }
:aBarGetList:= aLeveranciers
ENDWITH
/*
WITH OBJECT :oCol( 11 )
:nEditType := EDIT_BUTTON
ENDWITH
*/
// Toon memo met meer regels
//:aCols[ 9 ]:bEditValue := { || StrTran( oBrw:aRow[ 9 ], "<br>", CRLF ) }
//:nDataLines := 4
:bClrEdits := { || { CLR_BLACK, CLR_YELLOW }}
:nMarqueeStyle := MARQSTYLE_HIGHLROWMS
:bClrRowFocus := { || { CLR_BLACK, RGB(185,220,255) } }
:CreateFromCode()
END
//oBrw:bRClicked := { |r,c,f,oStru| msginfo("Code naar Clipbord : "+nofoto->ID),oClp:SetText(alltrim(nofoto->ID)) }
oBrw:MakeTotals()
oBrw:bGotFocus := {|| updatescreen(),oBrw:MakeTotals(),oBrw:refresh() }
oBrw:wis:bClrStd := { || IF( nofoto->wissen , { CLR_HRED,CLR_WHITE } , { CLR_BLACK,CLR_WHITE } ) }
oBrw:uit:bClrStd := { || IF( nofoto->uitass , { CLR_BLACK,CLR_HGREEN } , { CLR_HRED,CLR_WHITE } ) }
//oBrw:lHoverSelect := .t.
// oBrw:bToolTips := ;
// { | oBrw,r,c,f,oMouseCol,nMouseRow| MyColToolTip( oBrw,r,c,f,oMouseCol,nMouseRow ) }
// oBrw:bToolTips := ;
// { | oBrw,r,c,f,oMouseCol,nMouseRow| MyTip( oBrw,r,c,f,oMouseCol,nMouseRow ) }
//oBrw:att:bClrStd := { || IF( nofoto->colaanatt <> val (nofoto->colaantal) , { CLR_BLACK,CLR_HRED } , { CLR_BLACK,CLR_WHITE } ) }
//oBrw:pic:bClrStd := { || IF( nofoto->colaanpic <> val (nofoto->colaantal) , { CLR_BLACK,CLR_HRED } , { CLR_BLACK,CLR_WHITE } ) }
//oBrw:foto:bClrStd := { || IF( !nofoto->picfound , { CLR_BLACK,CLR_HRED } , { CLR_HRED,CLR_WHITE } ) }
// @ 830,100 say oGet PROMPT shownice(nofoto->memotxt) SIZE 700,200 PIXEL OF oWnd FONT oFont3 UPDATE
// @ 330,1610 say oGet PROMPT shownice(nofoto->memotxt) SIZE 500,400 PIXEL OF oWnd FONT oFont3 UPDATE
//@ 330,1610 say oGet PROMPT nofoto->memotxt SIZE 370,400 PIXEL OF oWnd FONT oFont3 UPDATE
// @ 590,1610 say oGet2 PROMPT master->memotxt SIZE 500,400 PIXEL OF oWnd FONT oFont3 UPDATE
// @ 60,1650 GET oGet VAR ( StrTran( nofoto->memo, "<br>", CRLF ) ) SIZE 370,400 PIXEL OF oWnd FONT oFont3 UPDATE
//oBrw:aCols[ 1 ]:nEditType = 0 // Don't allow to edit first column
// oBrw:aCols[ 2 ]:bOnChange = { || oBtnSave:Enable() }
//oBrw:aCols[ 2 ]:lWillShowABtn = .T.
//oBrw:nMarqueeStyle = MARQSTYLE_HIGHLROW
/*
oBrw:bClrStd = { || If( oBrw:KeyNo() % 2 == 0, ;
{ CLR_BLACK, RGB( 198, 255, 198 ) }, ;
{ CLR_BLACK, RGB( 232, 255, 232 ) } ) }
oBrw:bClrSel = { || { CLR_WHITE, RGB( 0x33, 0x66, 0xCC ) } }
oBrw:SetColor( CLR_BLACK, RGB( 232, 255, 232 ) )
*/
///////////////////////////////////////////////////////////////// BRW 2 /////////////////////////////////////////////////
@ 75,860 XBROWSE oBrw2 SIZE 280,170 ;
PIXEL OF oWnd font oFont3;
DATASOURCE "Foto";
COLUMNS "foto","foto" ;
HEADERS "Foto","Pic";
COLSIZES 150,50;
AUTOSORT CELL LINES FOOTERS NOBORDER fastedit
//oBrw2:bGotFocus := {|| oImage2:Refresh(), oBrwP:gotop(), oBrwP:refresh() }
//oBrw:bGotFocus := {|| oBrw2:seek(alltrim(nofoto->art_lev)),oImage2:Refresh()}
for n := 1 to Len( oBrw2:aCols )
WITH OBJECT oBrw2:aCols[ n ]
:bClrEdit := { || { CLR_BLACK, CLR_YELLOW }}
if :cDataType != 'L'
:uBarGetVal := uValBlank( :Value )
:cBarGetPic := :cEditPicture
endif
END
next
WITH OBJECT oBrw2
:lFooter := .t.
:bRecSelHeader := { || "Row" }
:bRecSelData := { |o| o:KeyNo }
:bRecSelFooter := { |o| o:nLen }
:oRecSelFont := oFont3 // optional
:nRecSelWidth := "99999" // required size
//:nStretchCol := 1
// :lIncrFilter := .t.
// :lSeekWild := ( nWild == 2 )
//:cFilterFld := "foto"
:lHScroll := .F.
:nRowHeight := 70
//:bFooters := { |oCol| If( Empty( oCol:cOrder ), "", oBrw2:cSeek("") ) }
:oSeek := TSeek():New( oBrw2 )
WITH OBJECT:pic
:bStrImage := { || "d:\pictures\smal\"+alltrim(foto->foto) }
:oDataFont := oFontXS
:nDataStrAlign := AL_CENTER + AL_BOTTOM
:nDataBmpAlign := AL_CENTER
:aImgRect := { nil, nil, -15, nil }
END
// :bChange := { || oImage2:Refresh() }
// :bOnChange := { || oData:RefreshCurrent() }
:CreateFromCode()
END
oBrw2:lGetBar := .T.
/*
@ 40, 870 SAY oBrw2:oSeek PROMPT oBrw2:cSeek SIZE 100,20 PIXEL OF oDlg COLOR CLR_BLACK,CLR_YELLOW PICTURE '@!'
@ 40,1000 BUTTON "Zoek Filter" size 80,20 pixel OF oDlg ACTION (("foto")->( ORDSCOPE(0, "" ) ),("foto")->( ORDSCOPE(1, "" ) ),('foto')->(DBGOTOP()),oBrw2:seek(alltrim(nofoto->zoeken)),oBrw2:refresh(),oBrw2:SetFocus()) font oFont3
@ 40,1100 BUTTON "Clear Filter" size 80,20 pixel OF oDlg ACTION (("foto")->( ORDSCOPE(0, "" ) ),("foto")->( ORDSCOPE(1, "" ) ),('foto')->(DBGOTOP()),oBrw2:seek(""),oBrw2:refresh(),oBrw2:SetFocus()) font oFont3
@ 40,1200 BUTTON "Selecteren" size 80,20 pixel OF oDlg ACTION (piccopy(),oBrw:refresh(),oBrw:SetFocus(),oImage:Refresh()) font oFont3
*/
@ 40,850 BTNBMP PROMPT "Set Filter" ;
SIZE 100,25 PIXEL OF oWnd FLAT ;
ACTION ( oBrw2:cAlias )->( ("foto")->( ORDSCOPE(0, "" ) ),("foto")->( ORDSCOPE(1, "" )),SetFilter( oBrw2 ) )
@ 40,970 BTNBMP PROMPT "Clear Filter" ;
SIZE 100,25 PIXEL OF oWnd FLAT ;
ACTION ( oBrw2:cAlias )->( DBCLEARFILTER(),("foto")->( ORDSCOPE(0, "" ) ),("foto")->( ORDSCOPE(1, "" ) ),oBrw2:gotop(),oBrw2:Refresh(), oBrw2:SetFocus() )
@ 40,1080 BTNBMP PROMPT "Copy Foto" ;
SIZE 100,25 PIXEL OF oWnd FLAT ;
ACTION ( msginfo("Copy foto"),oBrw:refresh() )
*/
//////////////////////////////////////////////////////////////// BRW 3 /////////////////////////////////////////////////
/*
@ 40,10 XBROWSE oBrw3 SIZE 470,280 ;
PIXEL OF oWnd font oFont3;
DATASOURCE "fotoinde" ;
COLUMNS "CODE","Titel","Index","Afdruk","Online","Uploaded","aantal" ;
HEADERS 'Pag', 'Menu', 'Submenu',"Sel","Online","upload","Aan";
COLSIZES 40,100,100,30,70,30,30;
AUTOSORT CELL LINES NOBORDER FASTEDIT
*/
@ 40,10 XBROWSE oBrw3 SIZE 470,200 ;
PIXEL OF oWnd font oFont3;
DATASOURCE "fotoinde" ;
COLUMNS "CODE","Titel","Index","menu3","Afdruk","Online","Uploaded","drukcode","aantal","toupload" ;
HEADERS 'Pag', 'Menu', 'Submenu',"Submenu3","Sel","Online","upload","Act","Aan","upL";
COLSIZES 40,100,80,80,30,68,30,30,30;
AUTOSORT CELL LINES NOBORDER FOOTERS
//FASTEDIT
oBrw3:aCols[2]:bClrStd := { || IF( !fotoinde->afdruk , { CLR_BLACK,CLR_WHITE } , { CLR_HRED,CLR_WHITE } ) }
oBrw3:SetChecks()
oBrw3:sel:nFooterType := AGGR_COUNT
oBrw3:sel:bSumCondition := { || fotoinde->afdruk }
oBrw3:MakeTotals()
WITH OBJECT oBrw3
:nStretchCol := 3
:nEditTypes := EDIT_GET
:bClrEdits := { || { CLR_BLACK, CLR_YELLOW }}
:nMarqueeStyle := MARQSTYLE_HIGHLROWMS
:bClrRowFocus := { || { CLR_BLACK, RGB(185,220,255) } }
//:lHScroll := .F.
//:Afdruk:SetCheck()
:lIncrFilter := .t.
:lSeekWild := ( nWild == 1 )
:cFilterFld := "code"
:bChange := { || SET_SCOPE_nobrowse(oBrw),('nofoto')->(DBGOTOP()),oBrw:Refresh(),oImage:Refresh(),oImage2:Refresh() }
:bKeyDown := { |nKey| If( nKey == VK_DELETE, (oBrw3:cAlias)->( Erase_detail( oBrw3 ) ), nil ) }
:CreateFromCode()
END
@ 220,500 BUTTON "Add" size 40,20 pixel OF oDlg ACTION (indexadd(),oBrw3:refresh()) font oFont3
@ 220,550 BUTTON "Xls" size 40,20 pixel OF oDlg ACTION (xbrowser("fotoinde"),oBrw3:refresh()) font oFont3
@ 220,600 BUTTON "->" size 40,20 pixel OF oDlg ACTION (Pic_smal_org(), oImage2:refresh(),oImage:refresh(),oBrw:setfocus() ) font oFont3
@ 220,650 BUTTON "Copy cover to ID" size 120,20 pixel OF oDlg ACTION (copy_covertoid(),oBrw:refresh(),oBrw:setfocus() ) font oFont3
@ 220,800 BUTTON "<-" size 40,20 pixel OF oDlg ACTION (Pic_org_smal(), oImage:refresh(),oImage2:refresh(),oBrw:setfocus() ) font oFont3
//@ 360,10 BTNBMP oBtn OF oDlg SIZE 120,30 PROMPT "Toevoegen" 2007 FONT oFont BOTTOM FILE "..\BITMAPS\sms.bmp" ACTION (indexadd(),oBrw3:refresh()) font oFont3
///////////////////////////////////////////////////////////////// BRW 4 /////////////////////////////////////////////////
select master
aVelden4 := { ;
{ "selection", "Sel" ,nil, 30 }, ;
{ "code" , "Code" ,nil, 60 }, ;
{ "naam" , "Naam" ,nil, 180 }, ;
{ "lev_naam" , "Lever" ,nil, 60 }, ;
{ "lev_ref" , "LevCode" ,nil, 60 }, ;
{ "fab_naam" , "Fabrikant",nil, 60 }, ;
{ "fab_ref" , "FabCode" ,nil, 60 }, ;
{ "Pagina" , "Pag" ,nil, 40 }, ;
{ "cat_main" , "Cat_Main" ,nil, 60 }, ;
{ "cat_sub1" , "Cat_sub" ,nil, 60 }, ;
{ "bruto" , "Bruto" ,nil, 40 }, ;
{ "aankoop" , "Aank" ,nil, 40 }, ;
{ "brutokor" , "Kor" ,nil, 40 }, ;
{ "kleuren" , "kleuren" ,nil, 50 }, ;
{ "maten" , "Maten" ,nil, 50 }, ;
{ "picture" , "Picture" ,nil, 50 }, ;
{ "memotxt" , "Memotxt" ,nil, 50 }, ;
{ "filename" , "Database" ,nil, 60 } }
@ 510,10 XBROWSE oBrw4 SIZE 1200,260 ;
PIXEL OF oWnd font oFont3;
DATASOURCE "MASTER" ;
COLUMNS aVelden4;
autosort CELL LINES FOOTERS NOBORDER fastedit
/*;
ON CHANGE ( ;
If( Empty( oBrw4:SelectedCol():cOrder ), ;
( oBrw4:SelectedCol():SetOrder(), oBrw4:seek(""), oBrw4:Refresh() ), ;
nil ) )
*/
oBrw4:SetChecks()
//oBrw4:nStretchCol := STRETCHCOL_WIDEST
for n := 1 to Len( oBrw4:aCols )
WITH OBJECT oBrw4:aCols[ n ]
if :cDataType != 'L'
:uBarGetVal := uValBlank( :Value )
:cBarGetPic := :cEditPicture
endif
END
next
// End of Relevant Code
oBrw4:bGotFocus := {|| oBrw4:refresh(),oImage_master:Refresh()}
/*
for nFor := 1 to Fcount()
oBrw:aCols[ nFor ]:bRClickHeader := {doheaders(oBrw4) }
//oBrw:aCols[ nFor ]:blDClickData := {|r,c,f,o| Msginfo("Left double click on column data " + o:cHeader, "TXBrowse power") }
next
*/
// oBrw4:aCols[ 14 ]:bLClickHeader := { doheaders(oBrw4),oBrw:refresh() }
// oBrw4:aCols[ 15 ]:bLClickHeader := { |r,c,f,oCol| head_col(oCol:Value),oBrw:refresh() }
// oBrw4:aCols[ (oBrw4:oCol:kleuren) ]:bLClickHeader := { |r,c,f,oCol| head_col(oCol:Value),oBrw:refresh() }
// oBrw4:aCols[ (oBrw4:kleuren) ]:bLClickHeader := { |r,c,f,oCol| head_col(oCol:Value),oBrw:refresh() }
// oBrw4:aCols[ (oCol:kleuren) ]:bLClickHeader := { |r,c,f,oCol| head_col(oCol:Value),oBrw:refresh() }
oBrw4:kleuren:bLClickHeader := { |r,c,f,oCol| head_col(oCol:Value),oBrw:refresh() }
oBrw4:maten:bLClickHeader := { |r,c,f,oCol| head_size(oCol:Value),oBrw:refresh() }
oBrw4:picture:bLClickHeader := { |r,c,f,oCol| head_pic(oCol:Value),oBrw:refresh(),oImage:refresh() }
oBrw4:memotxt:bLClickHeader := { |r,c,f,oCol| head_memo(oCol:Value),oBrw:refresh() }
oBrw4:Database:bLClickHeader := { |r,c,f,oCol| oBrw4:SetSize(oWnd:nWidth-35, oWnd:nHeight-670) }
//oBrw4:aCols[ 4 ]:bRClickHeader := {|r,c,f,o| Msginfo("Right click on column header " + o:cHeader, "TXBrowse power") }
//oBrw4:aCols[ 4 ]:bClrHeader := { |r,c,f,oCol| If( Empty( oCol:cOrder ),{ CLR_BLACK, nRGB(248,195,34) },{ CLR_BLACK, nRGB(240,240,240) }) }
// index
oBrw4:aCols[2]:bClrHeader := { || { CLR_RED, 155 } }
oBrw4:aCols[3]:bClrHeader := { || { CLR_RED, 155 } }
oBrw4:aCols[4]:bClrHeader := { || { CLR_RED, 155 } }
oBrw4:aCols[5]:bClrHeader := { || { CLR_RED, 155 } }
oBrw4:aCols[7]:bClrHeader := { || { CLR_RED, 155 } }
// copy action
oBrw4:kleuren:bClrHeader := { || { CLR_GREEN, 155 } }
oBrw4:maten:bClrHeader := { || { CLR_GREEN, 155 } }
oBrw4:picture:bClrHeader := { || { CLR_GREEN, 155 } }
oBrw4:memotxt:bClrHeader := { || { CLR_GREEN, 155 } }
oBrw4:Database:bClrHeader := { || { CLR_BLUE, 155 } }
WITH OBJECT oBrw4
//:nEditTypes := EDIT_GET
:lFooter := .t.
:bRecSelHeader := { || "" }
:bRecSelData := { |o| o:KeyNo }
:bRecSelFooter := { |o| o:nLen }
:oRecSelFont := oFont3 // optional
:nRecSelWidth := "99999" // required size
//:lIncrFilter := .t.
:lSeekWild := .t. //( nWild == 2 )
:cFilterFld := "naam"
:lHScroll := .F.
:lColChangeNotify := .t.
:lSortDescend := .f.
//:bFooters := { |oCol| If( Empty( oCol:cOrder ), "", oBrw4:cSeek ) }
:bFooters := { |oCol| If( Empty( oCol:cOrder ), "", oBrw4:cSeek("") ) }
:oSeek := TSeek():New( oBrw4 )
:nHeaderHeight := 40 // optional
:oHeaderFonts := oBold
:bClrEdits := { || { CLR_HRED, CLR_YELLOW } }
:nMarqueeStyle := MARQSTYLE_HIGHLROWMS
:bClrRowFocus := { || { CLR_BLACK, RGB(185,220,255) } }
// :bRClicked := { || xbrowse( oBrw4:aSelected, "SELECTED ROWS" ) }
// :bRClicked := { || markselected(oBrw4),oBrw4:refresh() }
:bRClicked := {|nRow, nCol| MenuPop( nRow,nCol, oBrw4 ),oBrw4:refresh() }
// :bRClicked := {|| oBrw4:SetSize(oWnd:nWidth-35, oWnd:nHeight-670) }
/*
:bRClicked := {|| (oWnd:Move( GetSysMetrics( SM_YVIRTUALSCREEN ),;
GetSysMetrics( SM_YVIRTUALSCREEN ),;
GetSysMetrics( SM_CXVIRTUALSCREEN ),;
GetSysMetrics( SM_CYVIRTUALSCREEN ), .T. ) ),;
oBrw4:SetSize(oWnd:nWidth-50, oWnd:nHeight-150) }
*/
*/
WITH OBJECT :Fabrikant
:nEditType := EDIT_GET
:bClrEdit := { || { CLR_BLACK, CLR_YELLOW }}
:bOnChange := { || oBrw4:RefreshCurrent() }
END
*/
//:nMarqueeStyle := MARQSTYLE_HIGHLROW
:lMultiSelect := .T.
//:bClrSelFocus := { || { CLR_BLACK, CLR_HGRAY } }
/*
:aCols[ 1 ]:bClrSelFocus := { ||{ CLR_BLACK, CLR_WHITE } }
:bLClicked := { |r,c,f,oBrw| If( oBrw:MouseColPos( c ) == 1 , ;
If( ( f := AScan( oBrw:aSelected, oBrw:BookMark ) ) == 0, ;
AAdd( oBrw:aSelected, oBrw:BookMark ), ;
ADel( oBrw:aSelected, f, .t. ) ), nil ), ;
oBrw:RefreshCurrent() }
*/
:bKeyDown := { |nKey| If( nKey == VK_DELETE, (oBrw4:cAlias)->( BrwDelselect( oBrw4 ) ), nil ) }
//:bChange := { || SET_MASTER(oBrw4),('foto')->(DBGOTOP()),oBrw2:Refresh(),oImage2:Refresh()}
//:bChange := { || SET_MASTER(oBrw4),('foto')->(DBGOTOP()),oBrw2:Refresh(),oImage2:Refresh()}
:bChange := { || oImage_master:refresh() }
:CreateFromCode()
END
oBrw4:lGetBar := .F.
oBrw4:bToolTips := ;
{ | oBrw4,r,c,f,oMouseCol,nMouseRow| MyColToolTip( oBrw4,r,c,f,oMouseCol,nMouseRow ) }
oBrw4:aCols[2]:bClrStd := { || IF( !empty(master->online) , { CLR_BLACK,CLR_HGREEN } , { CLR_HRED,CLR_WHITE } ) }
///////////////////////////////////////////////////////////////// BRW EANCODE /////////////////////////////////////////////////
select ean
aVelden5 := { ;
{ "code ", "Code" ,nil, 80 }, ;
{ "kleuren" , "Kleuren" ,nil, 80 }, ;
{ "maten" , "Maten" ,nil, 50 }, ;
{ "picture" , "Picture" ,nil, 100 }, ;
{ "filename" , "File" ,nil, 60 }, ;
{ "ean" , "Ean" ,nil, 80 } }
@ 40,1510 XBROWSE oBrwEan SIZE 450,700 ;
PIXEL OF oWnd font oFont3;
DATASOURCE "EAN" ;
COLUMNS aVelden5;
autosort CELL LINES FOOTERS NOBORDER fastedit
oBrwean:SetChecks()
//oBrw4:nStretchCol := STRETCHCOL_WIDEST
//oBrwEan:picture:bClrStd := { || IF( file("d:\pictures\smal\"+alltrim(ean->picture)) , { CLR_BLACK,CLR_HGREEN } , { CLR_BLACK,CLR_HRED } ) }
WITH OBJECT oBrwEan
//:nEditTypes := EDIT_GET
:lFooter := .t.
:bRecSelHeader := { || "" }
:bRecSelData := { |o| o:KeyNo }
:bRecSelFooter := { |o| o:nLen }
:oRecSelFont := oFont3 // optional
:nRecSelWidth := "99999" // required size
:lColChangeNotify := .t.
:lSortDescend := .f.
:nHeaderHeight := 30 // optional
:nRowHeight := 100
:oHeaderFonts := oBold
:bClrEdits := { || { CLR_HRED, CLR_YELLOW } }
:nMarqueeStyle := MARQSTYLE_HIGHLROWMS
:bClrRowFocus := { || { CLR_BLACK, RGB(185,220,255) } }
:lMultiSelect := .T.
WITH OBJECT:picture
:bStrImage := { || "d:\pictures\smal\"+alltrim(ean->picture) }
:oDataFont := oFontXS
:nDataStrAlign := AL_CENTER + AL_BOTTOM
:nDataBmpAlign := AL_CENTER
:aImgRect := { nil, nil, -15, nil }
END
hDC := oBrwEan:GETDC()
/*
oBrwAtt:bRClicked := {| nRow, nCol | nColor := GETPIXEL( hDC, nCol, nRow ), ;
MsgAlert( "Color : " + LTRIM(STR(nColor)) + CRLF + ;
"Row : " + LTRIM(STR(nRow)) + CRLF + ;
"Col : " + LTRIM(STR(nCol)), "Position"),ATT->ColDec = ltrim(str(nColor)) }
*/
// oBrwAtt:bRClicked := {| nRow, nCol | nColor := GETPIXEL( hDC, nCol, nRow ), ATT->ColDec = ltrim(str(nColor)), oBrwAtt:refresh() }
// oBrwAtt:bRClicked := {| nRow, nCol | GetHex(hDc,nCol,nRow),oBrwAtt:refresh() }
// oBrwATT:Dec:bClrStd := { || showcolors(oBrwATT:Dec:Value) }
//oBrwATT:bGotFocus := {|| oBrwATT:refreshcurrent() }
//oBrwATT:bGotFocus := {|| getfotos(oBrwATT) }
// oBrwATT:nRowHeight:= 70
// oBrwATT:aCols[ 4 ]:cDatatype := "F"
//oBrwATT:COLPIC := EDIT_GET
//hDC := oBrw:GETDC(0)
//oBrwAtt:bRClicked := {| nRow, nCol | GetHex(hDc,nCol,nRow),oBrwAtt:refresh() }
// oBrwEan:bRClicked := {| nRow, nCol | cColor := GetHexCol(nCol,nRow) }
oBrwEan:bRClicked := { || eanfotoupdate() }
:bChange := { || oImgean:Refresh() }
:bKeyDown := { |nKey| If( nKey == VK_DELETE, (oBrwEan:cAlias)->( BrwDelselect( oBrwEan ) ), nil ) }
:CreateFromCode()
END
//////////////////////////////////////////////////////////////////////////////// EINDE BROWSERS
//oBrw:SetGroupHeader( cGrpHdr, [nFrom], [nUpto], [oFont], [nAlign] )
//oBrw4:SetGroupHeader( "Section 1", 3, 5 )
// Pic from master
@ 700,1220 XIMAGE oImgean SIZE 120,120 OF oWnd SOURCE "d:\pictures\smal\"+alltrim(ean->picture)
oImgean:lBmpTransparent := .f.
@ 250,1220 BTNBMP PROMPT { || If( oBrw4:lGetBar, "Hide GetBar", "ShowGetBar" ) } ;
SIZE 100,25 PIXEL OF oWnd FLAT ;
ACTION ( oBrw4:lGetBar := ! oBrw4:lGetBar, oBrw4:Refresh() )
@ 280,1220 BTNBMP PROMPT "Set Filter" ;
SIZE 100,25 PIXEL OF oWnd FLAT ;
ACTION ( oBrw4:cAlias )->( SetFilter( oBrw4 ) )
@ 310,1220 BTNBMP PROMPT "Clear Filter" ;
SIZE 100,25 PIXEL OF oWnd FLAT ;
ACTION ( oBrw4:cAlias )->( DBCLEARFILTER(),("master")->( ORDSCOPE(0, "" ) ),("master")->( ORDSCOPE(1, "" ) ),oBrw4:gotop(),oBrw4:Refresh(), oBrw4:SetFocus() )
@ 340,1220 BTNBMP PROMPT "<- Copy 1 Rec" ;
SIZE 100,25 PIXEL OF oWnd FLAT ;
ACTION ( copy_to_selection(),oBrw:refresh() )
@ 370,1220 BTNBMP PROMPT "<- Bulk Copy" ;
SIZE 100,25 PIXEL OF oWnd FLAT ;
TOOLTIP "Importeer alle geselecteerde artikels van de onderste tabel" ;
ACTION ( Bulkcopy(),oBrw:gotop(),oBrw:refresh() )
@ 400,1220 BTNBMP PROMPT "<- Blanco" ;
SIZE 100,25 PIXEL OF oWnd FLAT ;
ACTION ( nofoto_add(),oBrw:gobottom(),oBrw:refresh() )
@ 430,1220 BTNBMP PROMPT "<- Clear Sel" ;
SIZE 100,25 PIXEL OF oWnd FLAT ;
ACTION ( Clearselection(),oBrw4:refresh() )
@ 460,1220 BTNBMP PROMPT "<- Prijs CTRL" ;
SIZE 100,25 PIXEL OF oWnd FLAT ;
ACTION ( prijscontrole(),oBrw:gotop(),oBrw:refresh() )
@ 490,1220 BTNBMP PROMPT "<- Rapport" ;
SIZE 100,25 PIXEL OF oWnd FLAT ;
ACTION oBrw:Report( nil, nil, nil, { |oRep,brw| MyReportSetup( oRep, brw ) } )
// Top, Left Lengte, Bottom _
@ 40,500 XIMAGE oImage SIZE 170, 170 OF oWnd SOURCE "d:\pictures\smal\"+alltrim(nofoto->orgfoto)
//oImage:lBmpTransparent := .f.
//@ 40,680 XIMAGE oImage2 SIZE 170,170 OF oWnd SOURCE "d:\pictures\smal\"+alltrim(foto->foto)
@ 40,680 XIMAGE oImage2 SIZE 170,170 OF oWnd SOURCE "d:\pictures\origineel\"+alltrim(nofoto->orgfoto)
oImage2:bLClicked:={|| imagetestnew("d:\pictures\origineel\"+alltrim(nofoto->orgfoto))}
// Pic from master
@ 520,1220 XIMAGE oImage_Master SIZE 120,120 OF oWnd SOURCE "d:\pictures\smal\"+alltrim(master->picture)
oImage_master:bLClicked:={|| imagetestnew("d:\pictures\smal\"+alltrim(master->picture))}
//oImage:lBmpTransparent := .f.
//@ 32,860 XIMAGE oImage2 SIZE 550,-300 OF oWnd SOURCE oBrw:aRow[2]
//oImage:SetBrush( oBrush )
//oImage2:SetBrush( oBrush2 )
WITH OBJECT oWnd
:nWidth := ScreenWidth() //* 0.6
:nHeight := ScreenHeight() //* 0.6
END
//@ 410,1750 BUTTON "Maak Webshop" size 80,20 pixel OF oDlg ACTION (makeshop()) font oFont3
@ 70,1150 BTNBMP oBtn OF oDlg SIZE 90, 20 NOBORDER PROMPT "Prestashop" 2007 ACTION ( makeshop(),updatescreen() ) FONT oFont4 CENTER
@ 70,1240 BTNBMP oBtn OF oDlg SIZE 90, 20 NOBORDER PROMPT "Shoptrader" 2007 ACTION ( shoptrader(),updatescreen() ) FONT oFont4 CENTER
@ 90,1150 BTNBMP oBtn1 OF oDlg SIZE 120, 20 NOBORDER PROMPT " Toon Foto's" 2007 ACTION (showimg(),oBrw:setfocus(),oBrw:refresh(),oBrw:drawselect() ) FONT oFont4 CENTER
@ 110,1270 BTNBMP oBtn1 OF oDlg SIZE 60, 20 NOBORDER PROMPT "PicLijst" 2007 ACTION (printimg()) FONT oFont4
@ 130,1270 BTNBMP oBtn1 OF oDlg SIZE 60, 20 NOBORDER PROMPT "PicUpload" 2007 ACTION (printuploadimg()) FONT oFont4
@ 110,1150 BTNBMP oBtn1 OF oDlg SIZE 120, 20 NOBORDER PROMPT " Print Foto's" 2007 ACTION (printcatalogus()) FONT oFont4
@ 130,1150 BTNBMP oBtn1 OF oDlg SIZE 120, 20 NOBORDER PROMPT " Move to Temp" 2007 TOOLTIP "Copy alle geselecteerde naar temp" ACTION (movetotemp(),oBrw:refresh()) FONT oFont4 LEFT
@ 150,1150 BTNBMP oBtn1 OF oDlg SIZE 120, 20 NOBORDER PROMPT " Copy to Temp" 2007 ACTION (Seltotemp()) FONT oFont4 LEFT
@ 170,1150 BTNBMP oBtn1 OF oDlg SIZE 120, 20 NOBORDER PROMPT " Temp to Selection" 2007 ACTION (temptosel(),oBrw:refresh()) FONT oFont4 LEFT
@ 190,1150 BTNBMP oBtn1 OF oDlg SIZE 120, 20 NOBORDER PROMPT " Clear Temp/Sel" 2007 ACTION (cleartemptosel(),oBrw:refresh()) FONT oFont4 LEFT
@ 210,1150 BTNBMP oBtn1 OF oDlg SIZE 120, 20 NOBORDER PROMPT " To Upload" 2007 ACTION toUpload() FONT oFont4 LEFT
//@ 285,1320 BTNBMP oBtn1 OF oDlg SIZE 120, 25 NOBORDER PROMPT " To Exel" 2007 ACTION oBrw:ToExcel(NIL,NIL,aExelcol1)
//DEFINE BUTTON OF oBar FILE "img\excel.bmp" PROMPT "Excel" GROUP TOOLTIP "Export to Excel" ACTION oBrw[1]:ToExcel(NIL,NIL,aExelCol1)
//@ 470,1750 BUTTON "Toon Foto's" size 80,20 pixel OF oDlg ACTION (showimg()) font oFont3
//@ 510,1750 BUTTON "Print Foto's" size 80,20 pixel OF oDlg ACTION (printimg()) font oFont3
///////////////////////////////////////////////////////// BROWSE 5 //////////////////////////////////////////////////////////////////////////////////////////////// BRW 5
/*
@ 40,1450 XBROWSE oBrwP OF oWnd SIZE 250,600 PIXEL DATASOURCE "ATT" ;
COLUMNS "COLNAAM","COLPIC + COLNAAM";
colsizes 100,100 ;
CELL LINES NOBORDER
WITH OBJECT oBrwP
:nRowHeight := 100
WITH OBJECT :aCols[ 2 ]
:bStrImage := { || "d:\pictures\origineel\"+alltrim(ATT->colpic) }
:oDataFont := oFontS
:nDataStrAlign := AL_CENTER + AL_BOTTOM
:nDataBmpAlign := AL_CENTER
:aImgRect := { nil, nil, -40, nil }
END
//
:CreateFromCode()
END
*/
// COLUMNS "left(COLPIC,15)+chr(13)+alltrim(COLNAAM)";
@ 40,1350 XBROWSE oBrwP OF oWnd SIZE 150,700 PIXEL DATASOURCE "FOTO" ;
COLUMNS "foto";
HEADERS "Foto Select";
colsizes 110 ;
CELL LINES NOBORDER
WITH OBJECT oBrwP
:nRowHeight := 80
:bLDblClick := { || Imagetestnew("d:\pictures\smal\"+alltrim(foto->foto)) }
:lFooter := .t.
:bRecSelHeader := { || "" }
:bRecSelData := { |o| o:KeyNo }
:bRecSelFooter := { |o| o:nLen }
:oRecSelFont := oFont3 // optional
:nRecSelWidth := "99" // required size
:lHScroll := .F.
WITH OBJECT :aCols[ 1 ]
//:bStrImage := { || "d:\pictures\smal\"+alltrim(ATT->colpic) }
:bStrImage := { || "d:\pictures\smal\"+alltrim(foto->foto) }
:oDataFont := oFontS
:nDataStrAlign := AL_CENTER + AL_BOTTOM
//:nDataStrAlign := AL_LEFT + AL_BOTTOM
:nDataBmpAlign := AL_CENTER
:aImgRect := { nil, nil, -20, nil }
END
//
:CreateFromCode()
END
// oBrwP:bRClicked := { || picATTcopy(),oBrw:refresh(),oBrw:SetFocus(),oImage:Refresh(),oImage2:Refresh() }
// oBrwP:bRClicked := {| nRow, nCol | cColor := GetHexCol(nCol,nRow) }
oBrwP:bRClicked := {| nRow, nCol | nofoto->orgfoto = foto->foto,obrw:refreshcurrent(),msginfo("Copy done") }
//ACTIVATE WINDOW oWnd CENTERED on init (oBrw3:setfocus())
//ACTIVATE DIALOG oDlg ON INIT DlgInit( oDlg, oBrw )
ACTIVATE WINDOW oWnd on init (DlgInit( oWnd, oBrw ),;
SET_SCOPE_nobrowse(oBrw),('nofoto')->(DBGOTOP()),;
oBrw:Refresh(),oImage:Refresh(),oImage2:Refresh(),oBrw3:setfocus())
RELEASE FONT oFont
RELEASE BRUSH oBrush