// FWH Class TOutLook2003 - \SAMPLES\TEST2003.PRG
#include "FiveWin.ch"
#include "Splitter.ch"
#include "OutLook.ch"
STATIC oBtn1, oBtn2, oBtn3, oBtn4
function Main()
LOCAL oFont, oBold
LOCAL oWnd, oOutLook2003, oStatusBar, oSplit, cCombo, oRad, nValue := 1
LOCAL oExBar, oPanel1, oPanel2, bClick := { | o | MsgInfo( o:GetText() ) }
DEFINE FONT oBold NAME "Tahoma" SIZE 0, -14 BOLD
DEFINE FONT oFont NAME "Tahoma" SIZE 0, -14
DEFINE WINDOW oWnd TITLE "FWH new Class TOutLook2003" MDI
/*
DEFINE OUTLOOK2003 oOutLook2003 OF oWnd ;
PROMPTS "Mail", "Calendar", "Contacts", "" ;
BITMAPS "..\bitmaps\mail.bmp", "..\bitmaps\calendar.bmp", "..\bitmaps\notes.bmp"
*/
DEFINE OUTLOOK2003 oOutLook2003 OF oWnd ;
PROMPTS "Mail", "Calendar", "MDI Silvio", "" ;
BITMAPS "..\bitmaps\mail.bmp", "..\bitmaps\calendar.bmp", "..\bitmaps\notes.bmp"
oWnd:oLeft = nil // Because the splitter is going to control the resize
@ 0, 0 EXPLORERBAR oExBar OF oOutLook2003:aDialogs[ 1 ] ;
SIZE oOutLook2003:aDialogs[ 1 ]:nWidth, oOutLook2003:aDialogs[ 1 ]:nHeight
oPanel1 = oExBar:AddPanel( "One", "..\bitmaps\32x32\people.bmp" )
oPanel1:lSpecial = .T.
oPanel1:AddLink( "First item", bClick, "..\bitmaps\16x16\additem.bmp" )
oPanel1:AddLink( "Second item", bClick, "..\bitmaps\16x16\copy.bmp" )
oPanel2 = oExBar:AddPanel( "Two", "..\bitmaps\32x32\case.bmp" )
oPanel2:AddLink( "First item", bClick, "..\bitmaps\16x16\adddbf.bmp" )
oPanel2:AddLink( "Second item", bClick, "..\bitmaps\16x16\delete0.bmp" )
oPanel2:AddLink( "Third item", bClick, "..\bitmaps\16x16\envelope.bmp" )
oPanel2:AddLink( "Fourth item", bClick, "..\bitmaps\16x16\copy.bmp" )
@ 1, 1 COMBOBOX cCombo ITEMS { "January", "February", "March", "April", "May" } ;
OF oOutLook2003:aDialogs[ 2 ] SIZE 170, 100
DEFINE FONT oFont NAME "Arial" SIZE 0, -10
@ 12, 10 SAY Date() OF oOutLook2003:aDialogs[ 2 ] SIZE 80, 20 FONT oFont
@ 3, 1 RADIO oRad VAR nValue OF oOutLook2003:aDialogs[ 2 ] ;
ITEMS "&Day", "&Week", "&Month" SIZE 100, 20
oRad:SetFont( oFont )
@ 1, 2 BUTTON oBtn1 PROMPT( "New" ) OF oOutLook2003:aDialogs[ 3 ] SIZE 80, 22 ;
ACTION BuildDlg()
SET FONT OF oBtn1 TO oBold
@ 3, 2 BUTTON oBtn2 PROMPT( "Edit 2" ) OF oOutLook2003:aDialogs[ 3 ] SIZE 80, 22 ;
ACTION MsgInfo( "Edit" )
SET FONT OF oBtn2 TO oBold
@ 5, 2 BUTTON oBtn3 PROMPT( "MDI Silvio" ) OF oOutLook2003:aDialogs[ 3 ] ;
SIZE 100, 22 ;
ACTION( SILVIO_MDI_FWH( oBtn3, oWnd ) ) // MsgInfo( "Search" )
SET FONT OF oBtn3 TO oBold
DEFINE STATUSBAR oStatusBar PROMPT " FWH Class TOutLook2003" OF oWnd
SetParent( oOutLook2003:hWnd, oWnd:hWnd )
oWnd:oClient = nil
@ 0, 191 SPLITTER oSplit ;
VERTICAL _3DLOOK ;
PREVIOUS CONTROLS oOutLook2003 ;
HINDS CONTROLS oWnd:oWndClient ;
SIZE 4, oWnd:nHeight - 70 PIXEL ;
OF oWnd
SetParent( oSplit:hWnd, oWnd:hWnd )
ACTIVATE WINDOW oWnd ;
ON RESIZE ( oSplit:Adjust(),;
WndLeft( oWnd:oWndClient:hWnd, oSplit:nRight + 1 ),;
WndWidth( oWnd:oWndClient:hWnd, oWnd:nWidth - oOutLook2003:nWidth - 23 ) )
oFont:End()
oBold:End()
return nil
//----------------------------------------------------------------------------//
FUNCTION SILVIO_MDI_FWH( oBtn3, oWnd )
LOCAL oBrw, oBar, oWndChild, oMsgBar, oFont, oBold, nColuna
oBtn3:Disable()
oBtn3:Refresh()
USE CUSTOMER NEW ALIAS "CUSTOMER"
GO TOP
nColuna := 3 // Inicia cursor na Descricao do Produto.
DEFINE FONT oBold NAME "Tahoma" SIZE 0, -14 BOLD
DEFINE FONT oFont NAME "Tahoma" SIZE 0, -14
DEFINE WINDOW oWndChild MDICHILD OF oWnd TITLE "Clients"
@ 2, 0 XBROWSE oBrw OF oWndChild LINES AUTOSORT ;
AUTOCOLS DATASOURCE "Customer" NOBORDER
oBrw:nHeadStrAligns := AL_CENTER // Centraliza os textos dos Titulos
oBrw:bClrHeader := {|| { CLR_GREEN, CLR_WHITE } } // cor dos titulos.
oBrw:bClrSelFocus = {|| { CLR_WHITE, RGB( 0, 128, 128 ) } } // CUANDO TIENE EL FOCUS
oBrw:nStretchCol := STRETCHCOL_WIDEST // Ajusta as colunas do xBrowse.
oBrw:nColSel := nColuna // <n> // Mister Nages - Perfect. Cursor inicia na xBrowse()
oBrw:oHeaderFonts := oBold // fonte nos titulos
oBrw:oFooterFonts := oBold
oBrw:CreateFromCode()
oBrw:SetFocus()
DEFINE BUTTONBAR oBar OF oWndChild 2015 SIZE 70, 60
oWndChild:oClient := oBrw
DEFINE MSGBAR oMsgBar OF oWndChild 2007
ACTIVATE WINDOW oWndChild MAXIMIZED ;
VALID( oBtn3:Enable(), oBtn3:Refresh(), oWndChild := nil, .T. )
oFont:End()
oBold:End()
/*
oBtn3:Enable()
oBtn3:Refresh()
*/
RETURN NIL
//----------------------------------------------------------------------------//
function BuildDlg()
local oDlg, oOutL2003
DEFINE DIALOG oDlg RESOURCE "Test"
REDEFINE OUTLOOK2003 oOutL2003 ID 110 OF oDlg ;
PROMPTS "One", "Two", "Three" ;
BITMAPS "..\bitmaps\mail.bmp", "..\bitmaps\calendar.bmp", "..\bitmaps\notes.bmp" ;
DIALOGS "Page1", "Page2", "Page3"
REDEFINE BUTTON ID 110 OF oOutL2003:aDialogs[ 1 ] ACTION MsgInfo( "Click" )
ACTIVATE DIALOG oDlg CENTERED
return nil
// FIN / END