Refresh vars in Office2007-Bar from MDI-Child ? => solved
Posted: Fri Feb 01, 2008 6:51 pm
Hello from Germany
I'm still busy with the DB-Tool i want to put in the forum
1 promlem is left :
I don't get the var in the Office2007-Bar updated,
when i change the var in the MDI-Child
Added Information : 02.02.2008
RECEIVE Values from a Outlook2003-Child
in a Office2007-ButtonBar
---------------------------------------------------------
GET = oGet:Value(), oGet:Refresh()
SAY = oSay:Varget(), oSay:Refresh()
RADIO = oRadio:nOption, oRadio:Refresh()
CHECKBOX = oCheck:Varget(), oCheck::Refresh()
SEND new Values from Office2007-ButtonBar
to a Outlook2003-Child
-----------------------------------------------------
RADIO = aScope:nOption(2), aScope:Refresh()
for .T.
CHECK = oCheck:Check(), oCheck:Refresh()
for .F.
CHECK = oCheck:UnCheck(), oCheck:Refresh()
GET = oGet:VarPut("NewValue"), oGet:Refresh()
SAY = oSay:VarPut("NewValue"), oSay:Refresh()
The changes for the problem :
// This Var has to be changed
//--------------------------------------
REDEFINE GET oEXPORT VAR cEXPORT ID 170 OF aCtrl[nPage] ;
PICTURE "!!!!!!!!!!!!!!!!!!!!" UPDATE
// -------------------------------------
aCtrl[nPage]:bStart:= ;
{|| B_Bar4(oDlg,oBrw5,aCtrl,nPage,cFile1,oExport) } // !!!!
// ----------------------------------------
FUNCTION B_Bar4(oDlg,oBrw5,aCtrl,nPage,cFile1,oExport) // !!!!
// The changed cEXPORT in the Child
// -----------------------------------------
DEFINE BUTTON oBtn1 OF oBar4 ;
ACTION ( aCtrl[nPage]:Update ), ; // Child Update
EXP_DBF(oEXPORT:Value(),cFile1), ; // the changed Var
DBSELECTAREA(1), DBGOTOP(), ;
oBrw5:Refresh(), ;
oBrw5:SetFocus() ) ;
RESOURCE "Question" PROMPT "DBF" + CRLF + "Exportieren"
// The old code
//------------ Quick- Browse Outlook2003 ---------------------------
FUNCTION PROG_4(oDlg,aCtrl,nPage,aCors)
LOCAL oFile1, oBrw5
LOCAL oFilter, oSUCH, aSCOPE, oINDKEY
LOCAL oOemAnsi, lClrFlag :=.f.
LOCAL nSCOPE := 1
LOCAL cFilter := SPACE( 70 )
LOCAL cFELD := "", l_INDEX := .F.
LOCAL lOemAnsi := .T., cOemAnsi := ""
LOCAL cFile1 := GET_DBF2()
LOCAL DBFTYP := CabDbf (cFile1)
LOCAL cEXPORT := "EXPORT.DBF "
// ----------------------------------------
// update ok in MDI-Child but not in the Office-Bar
DBSELECTAREA(1)
USE &cFile1
DBGOTOP()
// oDlg = oOutlook2003 Main-Dialog
// --------------------------------------------
// aCtrl[nPage] = Selected Button of oOutlook2003
// --------------------------------------------
DEFINE DIALOG aCtrl[nPage] RESOURCE "BROWSER_1" OF oDlg PIXEL
oBrw5 := TXBrowse():New( aCtrl[nPage] )
oBrw5:nMarqueeStyle := MARQSTYLE_HIGHLCELL
oBrw5:nColDividerStyle := LINESTYLE_BLACK
oBrw5:nRowDividerStyle := LINESTYLE_BLACK
oBrw5:lColDividerComplete := .t.
oBrw5:nHeaderLines := 1
oBrw5:nDataLines := 1
oBrw5:lAllowColSwapping := .t.
oBrw5:lOemToAnsi := lOemAnsi
oBrw5:SetRDD()
.........
.........
oBrw5:CreateFromResource( 110 )
// This Var has to be changed
//--------------------------------------
REDEFINE GET oEXPORT VAR cEXPORT ID 170 OF aCtrl[nPage] ;
PICTURE "!!!!!!!!!!!!!!!!!!!!" UPDATE
// -------------------------------------
// Connection of Office2007-Bar to the MDI-Child
//------------------------------------------------------
aCtrl[nPage]:bStart:= ;
{|| B_Bar4(oDlg,oBrw5,aCtrl,nPage,cFile1,cExport) }
ACTIVATE DIALOG aCtrl[nPage] NOWAIT ;
ON INIT ( aCtrl[nPage]:Move( aCORS [1] + 15, aCORS [2] + 200, ;
aCtrl[nPage]:nWidth, aCtrl[nPage]:nHeight, .f. ) )
RETURN( NIL )
// ----------------------------------------
FUNCTION B_Bar4(oDlg,oBrw5,aCtrl,nPage,cFile1,cExport)
LOCAL oBar4, oBtn1
// I want a Export of => cFile1 To => cEXPORT
DEFINE BUTTONBAR oBar4 SIZE 65, 95 _3D 2007 ;
OF aCtrl[nPage] RIGHT
// Updates cEXPORT in the Child but not here
// ---------------------------------------------------
DEFINE BUTTON oBtn1 OF oBar4 ;
ACTION ( aCtrl[nPage]:Update ), ;
EXP_DBF(cEXPORT,cFile1), ;
DBSELECTAREA(1), DBGOTOP(), ;
oBrw5:Refresh(), ;
oBrw5:SetFocus() ) ;
RESOURCE "Question" PROMPT "DBF" + CRLF + "Exportieren"
RETURN( NIL )
Is it possible, to get a refresh of oBar4 ?
Regards
U. König
I'm still busy with the DB-Tool i want to put in the forum
1 promlem is left :
I don't get the var in the Office2007-Bar updated,
when i change the var in the MDI-Child
Added Information : 02.02.2008
RECEIVE Values from a Outlook2003-Child
in a Office2007-ButtonBar
---------------------------------------------------------
GET = oGet:Value(), oGet:Refresh()
SAY = oSay:Varget(), oSay:Refresh()
RADIO = oRadio:nOption, oRadio:Refresh()
CHECKBOX = oCheck:Varget(), oCheck::Refresh()
SEND new Values from Office2007-ButtonBar
to a Outlook2003-Child
-----------------------------------------------------
RADIO = aScope:nOption(2), aScope:Refresh()
for .T.
CHECK = oCheck:Check(), oCheck:Refresh()
for .F.
CHECK = oCheck:UnCheck(), oCheck:Refresh()
GET = oGet:VarPut("NewValue"), oGet:Refresh()
SAY = oSay:VarPut("NewValue"), oSay:Refresh()
The changes for the problem :
// This Var has to be changed
//--------------------------------------
REDEFINE GET oEXPORT VAR cEXPORT ID 170 OF aCtrl[nPage] ;
PICTURE "!!!!!!!!!!!!!!!!!!!!" UPDATE
// -------------------------------------
aCtrl[nPage]:bStart:= ;
{|| B_Bar4(oDlg,oBrw5,aCtrl,nPage,cFile1,oExport) } // !!!!
// ----------------------------------------
FUNCTION B_Bar4(oDlg,oBrw5,aCtrl,nPage,cFile1,oExport) // !!!!
// The changed cEXPORT in the Child
// -----------------------------------------
DEFINE BUTTON oBtn1 OF oBar4 ;
ACTION ( aCtrl[nPage]:Update ), ; // Child Update
EXP_DBF(oEXPORT:Value(),cFile1), ; // the changed Var
DBSELECTAREA(1), DBGOTOP(), ;
oBrw5:Refresh(), ;
oBrw5:SetFocus() ) ;
RESOURCE "Question" PROMPT "DBF" + CRLF + "Exportieren"
// The old code
//------------ Quick- Browse Outlook2003 ---------------------------
FUNCTION PROG_4(oDlg,aCtrl,nPage,aCors)
LOCAL oFile1, oBrw5
LOCAL oFilter, oSUCH, aSCOPE, oINDKEY
LOCAL oOemAnsi, lClrFlag :=.f.
LOCAL nSCOPE := 1
LOCAL cFilter := SPACE( 70 )
LOCAL cFELD := "", l_INDEX := .F.
LOCAL lOemAnsi := .T., cOemAnsi := ""
LOCAL cFile1 := GET_DBF2()
LOCAL DBFTYP := CabDbf (cFile1)
LOCAL cEXPORT := "EXPORT.DBF "
// ----------------------------------------
// update ok in MDI-Child but not in the Office-Bar
DBSELECTAREA(1)
USE &cFile1
DBGOTOP()
// oDlg = oOutlook2003 Main-Dialog
// --------------------------------------------
// aCtrl[nPage] = Selected Button of oOutlook2003
// --------------------------------------------
DEFINE DIALOG aCtrl[nPage] RESOURCE "BROWSER_1" OF oDlg PIXEL
oBrw5 := TXBrowse():New( aCtrl[nPage] )
oBrw5:nMarqueeStyle := MARQSTYLE_HIGHLCELL
oBrw5:nColDividerStyle := LINESTYLE_BLACK
oBrw5:nRowDividerStyle := LINESTYLE_BLACK
oBrw5:lColDividerComplete := .t.
oBrw5:nHeaderLines := 1
oBrw5:nDataLines := 1
oBrw5:lAllowColSwapping := .t.
oBrw5:lOemToAnsi := lOemAnsi
oBrw5:SetRDD()
.........
.........
oBrw5:CreateFromResource( 110 )
// This Var has to be changed
//--------------------------------------
REDEFINE GET oEXPORT VAR cEXPORT ID 170 OF aCtrl[nPage] ;
PICTURE "!!!!!!!!!!!!!!!!!!!!" UPDATE
// -------------------------------------
// Connection of Office2007-Bar to the MDI-Child
//------------------------------------------------------
aCtrl[nPage]:bStart:= ;
{|| B_Bar4(oDlg,oBrw5,aCtrl,nPage,cFile1,cExport) }
ACTIVATE DIALOG aCtrl[nPage] NOWAIT ;
ON INIT ( aCtrl[nPage]:Move( aCORS [1] + 15, aCORS [2] + 200, ;
aCtrl[nPage]:nWidth, aCtrl[nPage]:nHeight, .f. ) )
RETURN( NIL )
// ----------------------------------------
FUNCTION B_Bar4(oDlg,oBrw5,aCtrl,nPage,cFile1,cExport)
LOCAL oBar4, oBtn1
// I want a Export of => cFile1 To => cEXPORT
DEFINE BUTTONBAR oBar4 SIZE 65, 95 _3D 2007 ;
OF aCtrl[nPage] RIGHT
// Updates cEXPORT in the Child but not here
// ---------------------------------------------------
DEFINE BUTTON oBtn1 OF oBar4 ;
ACTION ( aCtrl[nPage]:Update ), ;
EXP_DBF(cEXPORT,cFile1), ;
DBSELECTAREA(1), DBGOTOP(), ;
oBrw5:Refresh(), ;
oBrw5:SetFocus() ) ;
RESOURCE "Question" PROMPT "DBF" + CRLF + "Exportieren"
RETURN( NIL )
Is it possible, to get a refresh of oBar4 ?
Regards
U. König