change title header of outlook2003
change title header of outlook2003
How I can to modify the title header of outlook2003 of each agroup ?
when I change record of xbrowse I want call this
FUNCTION RefreshCont(oCont,cdbf)
oCont:cTitle:="Cust "+tran((cdbf)->(OrdKeyNo()),'@E 999,999')+" / "+tran((cdbf)->(OrdKeyCount()),'@E 999,999')
oCont:refresh()
return NIL
oCont must be the header of outlook2003 group number 1
when I change record of xbrowse I want call this
FUNCTION RefreshCont(oCont,cdbf)
oCont:cTitle:="Cust "+tran((cdbf)->(OrdKeyNo()),'@E 999,999')+" / "+tran((cdbf)->(OrdKeyCount()),'@E 999,999')
oCont:refresh()
return NIL
oCont must be the header of outlook2003 group number 1
Best Regards, Saludos
Falconi Silvio
Falconi Silvio
- Antonio Linares
- Site Admin
- Posts: 42521
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Has thanked: 31 times
- Been thanked: 76 times
- Contact:
Application
===========
Path and name: C:\work\errori\testoutlook3\test2003.Exe (32 bits)
Size: 1,489,920 bytes
Time from start: 0 hours 0 mins 2 secs
Error occurred at: 08/02/08, 23:44:37
Error description: Error BASE/1004 Class: 'NIL' has no exported method: AGROUPS
Args:
[ 1] = U
===========
Path and name: C:\work\errori\testoutlook3\test2003.Exe (32 bits)
Size: 1,489,920 bytes
Time from start: 0 hours 0 mins 2 secs
Error occurred at: 08/02/08, 23:44:37
Error description: Error BASE/1004 Class: 'NIL' has no exported method: AGROUPS
Args:
[ 1] = U
Code: Select all | Expand
#include "FiveWin.ch"
#include "Splitter.ch"
#include "xbrowse.ch"
REQUEST DBFCDX, DBFFPT
External ordkeyno, ordkeycount,ordcreate
static lExit := .F.
STATIC aCtrl // <-----
static oGrid ,nsplit:=0
static oBar
static oWnd
static oOutLook2003
//----------------------------------------------------------------------------//
function Main()
local oWnd, oOutLook2003, oStatusBar, oSplit, cCombo, oRad, nValue := 1
local oFont
lOCAL nSplit:=191
RddSetDefault( "DBFCDX" )
DEFINE WINDOW oWnd TITLE "WinBeach - 1.00 - Light version" MDI ;
MENU BuildMenu()
DEFINE BUTTONBAR oBar _3D SIZE 44, 46 OF oWnd 2007
oBar:bRClicked := { || .t. }
DEFINE BUTTON OF oBar ;
RESOURCE "BB1" ;
TOOLTIP i18n( "Gestión de documentos" ) ;
MESSAGE i18n( "Gestión de del fichero de documentos." ) ;
NOBORDER
DEFINE OUTLOOK2003 oOutLook2003 OF oWnd ;
PROMPTS "Spiaggia", "Calendario", "Contatti", "Restaurant" ;
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
// DIALOG 1
@ 1, 2 BUTTON "New" OF oOutLook2003:aDialogs[ 1 ] SIZE 80, 22 ACTION BuildDlg()
@ 3, 2 BUTTON "Edit" OF oOutLook2003:aDialogs[ 1 ] SIZE 80, 22 ACTION MsgInfo( "Edit" )
@ 5, 2 BUTTON "Search" OF oOutLook2003:aDialogs[ 1 ] SIZE 80, 22 ACTION MsgInfo( "Search" )
// DIALOG 3
@ 1, 2 BUTTON "New" OF oOutLook2003:aDialogs[ 3] SIZE 80, 22 ACTION BuildDlg()
@ 3, 2 BUTTON "Edit" OF oOutLook2003:aDialogs[ 3 ] SIZE 80, 22 ACTION MsgInfo( "Edit" )
@ 5, 2 BUTTON "Search" OF oOutLook2003:aDialogs[ 3 ] SIZE 80, 22 ACTION MsgInfo( "Search" )
@ 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 )
#ifndef __CLIPPER__
DEFINE STATUSBAR oStatusBar PROMPT " FWH Class TOutLook2003" OF oWnd
#else
DEFINE MESSAGE oStatusBar PROMPT " FWH Class TOutLook2003" OF oWnd
#endif
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 )
*oWnd:bResized := {|| ResizeWndMain() }
ACTIVATE WINDOW oWnd ;
ON RESIZE oSplit:Adjust();
VALID lExit := .T.
return nil
Function ResizeWndMain(oWnd)
local aClient
aClient := GetClientRect (oWnd:hWnd )
oGrid:SetSize( aClient[4], oWnd:nHeight - 26 )
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
//----------------------------------------------------------------------------//
function WinRun()
while NoGPF()
if lExit
PostQuitMessage( 0 )
endif
end
return nil
//----------------------------------------------------------------------------//
#pragma BEGINDUMP
#include <windows.h>
#include <hbapi.h>
BOOL SysRefresh( void );
HB_FUNC( NOGPF )
{
__try
{
hb_retl( SysRefresh() );
}
__except ( ( hb_retl( TRUE ), TRUE ) )
{}
}
#pragma ENDDUMP
#define LIGHTBLUE nRGB( 89, 135, 214 )
#define DARKBLUE nRGB( 3, 56, 147 )
#define LIGHTORANGE1 nRGB( 250, 227, 143 )
#define DARKORANGE1 nRGB( 238, 152, 25 )
#define LIGHTCYAN nRGB( 203, 225, 252 )
#define DARKCYAN nRGB( 125, 165, 224 )
#define LIGHTORANGE2 nRGB( 255, 255, 220 )
#define DARKORANGE2 nRGB( 247, 192, 91 )
//---------------------------------------------------------------
FUNCTION Show (oOutLook, oWnd,nSplit) // <-----
LOCAL nPage := AScan( oOutLook:aGroups, { | o | o:lSelected } )
LOCAL nAllPages := Len (oOutLook:aGroups)
LOCAL oDlg, oCtrl, i
Local hDC :=oWnd:getdc()
Local oGrid,oFont
Local ntop ,ocol ,for
DEFINE FONT oFont NAME "Arial" SIZE 0, -20
FOR i := 1 TO nAllPages
IIF (Valtype (aCtrl[i]) ="O",aCtrl[i]:Hide(), )
NEXT
nTop = oWnd:nHeight - ( Len(oOutLook:aGroups ) *166 )
DO CASE
CASE nPage = 1
IF Valtype (aCtrl[nPage]) ="O"
aCtrl[nPage]:Show()
ELSE
ENDIF
CASE nPage = 2
CASE nPage = 3
IF Valtype (aCtrl[nPage]) ="O"
aCtrl[nPage]:Show()
ELSE
//header
Gradient( hDC, { nTop, 50, nTop + 30, oWnd:nWidth() }, DARKBLUE, LIGHTBLUE, .T. )
oWnd:Say( nTop + 8 , 200,"Customer",CLR_WHITE,,oFont, .T., .T. )
/* DEFINE DIALOG aCtrl[nPage] FROM 1,1 TO 15,35 OF oWnd ;
TITLE "I am at the right side"
ACTIVATE DIALOG aCtrl[nPage] ;
ON INIT aCtrl[nPage]:Center (oWnd);
NOWAIT
*/
// GRID
Db_Open("customer", "CUST" )
oGrid := TXBrowse():New( oWnd )
oGrid:nTop := nTop +50
oGrid:nLeft := nSplit+1
oGrid:nBottom := oWnd:nheight()
oGrid:nRight := oWnd:nWidth()
oGrid:cAlias := "CUST"
oGrid:nMarqueeStyle := MARQSTYLE_HIGHLCELL
oGrid:nColDividerStyle := LINESTYLE_BLACK
oGrid:nRowDividerStyle := LINESTYLE_BLACK
oGrid:lColDividerComplete := .f.
oGrid:SetRDD()
for nFor := 1 to len( oGrid:aCols )
oCol:= oGrid:aCols[ nFor ]
oCol:nEditType := 1
oCol:bOnPostEdit := {|o, v, n| iif( n != VK_ESCAPE, FieldPut( o:nCreationOrder, v ), ) }
next
oGrid:CreateFromCode()
oWnd := oGrid
oCont:= oOutLook2003:aGroups[ 3 ]:cPrompt
oGrid:bChange := { || RefreshCont( oCont,"CUst") }
*/
ENDIF
CASE nPage = 4
IF Valtype (aCtrl[nPage]) ="O"
aCtrl[nPage]:Show()
ELSE
oWnd:Say( nTop + 8 , 200,"tavoli",CLR_WHITE,,oFont, .T., .T. )
ENDIF
ENDCASE
RETURN (nil)
FUNCTION RefreshCont(oCont,cdbf)
oCont:cTitle:="Cust "+tran((cdbf)->(OrdKeyNo()),'@E 999,999')+" / "+tran((cdbf)->(OrdKeyCount()),'@E 999,999')
oCont:refresh()
return NIL
FUNCTION Db_Open(cdbf, cAlias )
use &cDbf ALIAS &cAlias index &cDbf
RETURN .t.
Function BuildMenu()
local oMenu
MENU oMenu 2007
MENUITEM "&Archivo"
MENU
MENUITEM i18n( "Specificare Stampante" ) ;
ACTION PrinterSetup() ;
MESSAGE i18n( " Configurazione stampantea. " )
SEPARATOR
MENUITEM i18n( "Uscita" ) ;
ACTION oWnd:end() ;
MESSAGE i18n( " Terminare la esecuzione del programma. " )
ENDMENU
ENDMENU
RETURN oMenu
Best Regards, Saludos
Falconi Silvio
Falconi Silvio
- Antonio Linares
- Site Admin
- Posts: 42521
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Has thanked: 31 times
- Been thanked: 76 times
- Contact:
- Antonio Linares
- Site Admin
- Posts: 42521
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Has thanked: 31 times
- Been thanked: 76 times
- Contact:
Silvio,
In FWH\samples\Test2003.prg add this line:
In FWH\samples\Test2003.prg add this line:
Code: Select all | Expand
DEFINE OUTLOOK2003 oOutLook2003 OF oWnd ;
PROMPTS "Mail", "Calendar", "Contacts", "" ;
BITMAPS "..\bitmaps\mail.bmp", "..\bitmaps\calendar.bmp", "..\bitmaps\notes.bmp"
MsgInfo( ValType( oOutLook2003 ), oOutLook2003:ClassName() ) // this one!
right and I made on function Show
LOCAL nPage := AScan( oOutLook:aGroups, { | o | o:lSelected } )
LOCAL nAllPages := Len (oOutLook:aGroups)
FOR i := 1 TO nAllPages
IIF (Valtype (aCtrl[i]) ="O",aCtrl[i]:Hide(), )
NEXT
nTop = oWnd:nHeight - ( Len(oOutLook:aGroups ) *166 )
DO CASE
....
CASE nPage = 3
IF Valtype (aCtrl[nPage]) ="O"
aCtrl[nPage]:Show()
ELSE
oGrid := TXBrowse():New( oWnd )
oCont:= oOutLook2003:aGroups[ nPage ]:cPrompt
oGrid:bChange := { || RefreshCont( oCont,"CUst") }
where is the error ?
LOCAL nPage := AScan( oOutLook:aGroups, { | o | o:lSelected } )
LOCAL nAllPages := Len (oOutLook:aGroups)
FOR i := 1 TO nAllPages
IIF (Valtype (aCtrl[i]) ="O",aCtrl[i]:Hide(), )
NEXT
nTop = oWnd:nHeight - ( Len(oOutLook:aGroups ) *166 )
DO CASE
....
CASE nPage = 3
IF Valtype (aCtrl[nPage]) ="O"
aCtrl[nPage]:Show()
ELSE
oGrid := TXBrowse():New( oWnd )
oCont:= oOutLook2003:aGroups[ nPage ]:cPrompt
oGrid:bChange := { || RefreshCont( oCont,"CUst") }
where is the error ?
Best Regards, Saludos
Falconi Silvio
Falconi Silvio
- Antonio Linares
- Site Admin
- Posts: 42521
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Has thanked: 31 times
- Been thanked: 76 times
- Contact:
- Antonio Linares
- Site Admin
- Posts: 42521
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Has thanked: 31 times
- Been thanked: 76 times
- Contact:
- Antonio Linares
- Site Admin
- Posts: 42521
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Has thanked: 31 times
- Been thanked: 76 times
- Contact:
- Antonio Linares
- Site Admin
- Posts: 42521
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Has thanked: 31 times
- Been thanked: 76 times
- Contact:
the sample is here
www.teramoest.it/test_antonio_outlook3.rar
I use two dbf ( customer and part they are in sample directory) and I use a panel to show many buttons
when I open the application I must see the buttons but I not see they
then
I select the second menu I see the first xbrowse
then
I select the third menu I see the second xbrowse but the procedure not erase the first xbrowse
then
I select the first menu now I see the button but there are also the xbrowse 1 and xbrowse 2
How I can to see one screen ( xbrowse1 or xbrowse2 or Panel button) ?
i think this technical method can be usefull for all community
thanks
www.teramoest.it/test_antonio_outlook3.rar
I use two dbf ( customer and part they are in sample directory) and I use a panel to show many buttons
when I open the application I must see the buttons but I not see they
then
I select the second menu I see the first xbrowse
then
I select the third menu I see the second xbrowse but the procedure not erase the first xbrowse
then
I select the first menu now I see the button but there are also the xbrowse 1 and xbrowse 2
How I can to see one screen ( xbrowse1 or xbrowse2 or Panel button) ?
i think this technical method can be usefull for all community
thanks
Best Regards, Saludos
Falconi Silvio
Falconi Silvio