DEFINE OUTLOOK2003 oOutLook2003 OF oWnd ;
PROMPTS "Mail", "Calendar", "Contacts", "" ;
BITMAPS ".\bitmaps\mail.bmp", ".\bitmaps\calendar.bmp", ".\bitmaps\notes.bmp" ;
ON CHANGE (Show (oOutLook2003, oWnd:oWndClient,nSplit)) // <-----
aCtrl := Array (Len (oOutLook2003:aGroups)) // <-----
oWnd:oLeft = nil // Because the splitter is going to control the resize
FUNCTION Show (oOutLook, oWnd,nSplit) // <-----
LOCAL nPage := AScan( oOutLook:aGroups, { | o | o:lSelected } )
LOCAL nAllPages := Len (oOutLook:aGroups)
Local Cont,oTab
LOCAL oDlg, oCtrl, i
Local hDC :=oWnd:getdc()
Local oFont
Local ntop,ocol,for, oCont
Local oBrowse1,oBrowse2,oPanel
SELECT 1
Db_Open("CUSTOMER", "CUST" )
SELECT 2
Db_Open("PART", "PARTNO" )
DEFINE FONT oFont NAME "Arial" SIZE 0, -20
FOR i := 1 TO nAllPages
IIF (Valtype (aCtrl[i]) ="O",aCtrl[i]:Hide(), )
NEXT
DO CASE
CASE nPage = 1
IF Valtype (aCtrl[nPage]) ="O"
aCtrl[nPage]:Show()
ELSE
PROG_1(oWnd,aCtrl,nPage,oOutLook)
ENDIF
CASE nPage = 2
IF Valtype (aCtrl[nPage]) ="O"
aCtrl[nPage]:Show()
ELSE
PROG_2(oWnd,aCtrl,nPage,oOutLook)
ENDIF
CASE nPage = 3
IF Valtype (aCtrl[nPage]) ="O"
aCtrl[nPage]:Show()
ELSE
ENDIF
CASE nPage = 4
IF Valtype (aCtrl[nPage]) ="O"
aCtrl[nPage]:Show()
ELSE
ENDIF
ENDCASE
RETURN ( NIL )
Function PROG_1(oWnd,aCtrl,nPage,oOutLook)
nTop = oBar:nHeight-10 - ( Len(oOutLook:aGroups ) )
aCtrl[nPage]:= TPanel():New( nTop-25, nSplit+1, oOutLook:nbottom, 1020, oWnd )
DBSELECTAREA(1)
oLbx := TXBrowse():New( aCtrl[nPage] )
oLbx:nBottom := aCtrl[nPage]:nBottom
oLbx:nRight := aCtrl[nPage]:nWidth
oLbx:SetRDD()
for nFor := 1 to len( oLbx:aCols )
oCol := oLbx:aCols[ nFor ]
oCol:nEditType := 1
oCol:bOnPostEdit := {|o, v, n| iif( n != VK_ESCAPE, FieldPut( o:nCreationOrder, v ), ) }
next
olbx:CreateFromCode()
RETURN NIL
Function PROG_2(oWnd,aCtrl,nPage,oOutLook)
nTop = oBar:nHeight-10 - ( Len(oOutLook:aGroups ) )
aCtrl[nPage]:= TPanel():New( nTop-25, nSplit+1, oOutLook:nbottom, 1020, oWnd )
DBSELECTAREA(2)
oLbx := TXBrowse():New( aCtrl[nPage] )
oLbx:nBottom := aCtrl[nPage]:nBottom -100
oLbx:nRight := aCtrl[nPage]:nWidth
oLbx:SetRDD()
for nFor := 1 to len( oLbx:aCols )
oCol := oLbx:aCols[ nFor ]
oCol:nEditType := 1
oCol:bOnPostEdit := {|o, v, n| iif( n != VK_ESCAPE, FieldPut( o:nCreationOrder, v ), ) }
next
olbx:CreateFromCode()
RETURN NIL
DEFINE OUTLOOK2003 oOutLook2003 OF oWnd ;
PROMPTS "Mail", "Calendar", "Contacts", "" ;
BITMAPS "..\bitmaps\mail.bmp", "..\bitmaps\calendar.bmp", "..\bitmaps\notes.bmp"
ON CHANGE If( nOption == 1, oWnd1:Maximize(), oWnd2:Maximize() )
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: Google [Bot], jmartial, Silvio.Falconi and 43 guests