Page 1 of 2

Antonio , Please I want understand toutlook2003 class

Posted: Mon Aug 04, 2008 9:49 pm
by Silvio
My test
Image

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

Test-application Outlook

Posted: Mon Aug 04, 2008 10:20 pm
by ukoenig
Hello Silvio,

As i told you,
I will send you a complete test-application
for outlook :

Image

Image

Image

Image

Just have a look at it.

I ckecked your source.
There are some mistakes.
It cannot work like this.


Best Regards
Uwe :lol:

Posted: Tue Aug 05, 2008 7:58 am
by Silvio
Uwe,
I want use test2003 .prg of linares for the test
I need to show xbrowse for the one menu,
but I need to show only button in another menu
can you say how I must make to not show all the controls ?

TOutlook2003

Posted: Tue Aug 05, 2008 3:12 pm
by David Williams
Uwe

Where can I get a copy of your test application.

Regards
David

Outlook-Test

Posted: Tue Aug 05, 2008 4:06 pm
by ukoenig
Hello,

because of the german language,
i still have to add some english text.
After that i create a Download-link

Regards
Uwe :lol:

Download of Outlook-Tests

Posted: Wed Aug 06, 2008 10:29 am
by ukoenig
Hello,

Here is a Download for Tests :
In the short time, i couldn't translate any text to english.
But the test includes my complete working-directory.
A bit more time and i will prepare it for the forum.
There are still more different samples i have done.

Maybe for a start ( prg-structure ), the 1. sample helps

http://www.pflegeplus.com/fw_downloads/OutlookTest1.zip

Best Regards
Uwe :lol:

Posted: Wed Aug 06, 2008 4:03 pm
by Silvio
why U have insert splitter.prg in zip , do U have a new version?

Outlook-samples

Posted: Wed Aug 06, 2008 4:26 pm
by ukoenig
Hello Silvio,

The zip-file includes everything i had to look for.
It is my complete working-directory.
splitter.prg is just the sample i had to look for, how it works.

The link file contains only 2 files :

PRG = \
outlook_g.PRG \
errsysw_g.PRG

A different looking sample
( also with complete working directory, ready to use )

http://www.pflegeplus.com/fw_downloads/OutlookTest2.zip


Because i have a little bit more time now,
i will do some translations and explain
how it works and what to do.

Because of questions,
I have still some more different samples.
I will have a look at them for downloading.

Regards
Uwe :lol:

Posted: Wed Aug 06, 2008 4:57 pm
by Silvio
I tried Your test sample and it run ok but I need another test sample because in your there is a big different problem.
On your test I can see a main window with a buttonbar at left and at top.
From the first buttonbar I can call a dialog where I can see at right the outlook2003 control and I can select the menuitem and i can see different dialogs to the left.

But , but, but, But

it is big different from my problem
I want explain to you :
the test2003 of linares create a outlook2003 control to the right of window .
It not open anther Dialog .
I want select the menuitem from outlook2003 control and see a different controls to the right of the same window : one can be a xbrowse , can be a tree or a dialog or a bmp

I hope you understand now!

I not want open a dialog into main window and insert the outlook2003 control intoinstead i want insert the outlook2003 control into the main window and dialog to the right

Each time I ask to the community an big help i wish a right message
and perhaps U not understood my problem.


If you have an idea U're welcome

Posted: Wed Aug 06, 2008 5:18 pm
by Antonio Linares
Silvio,

Have a look at the code used here. It can help you:

http://forums.fivetechsoft.com/viewtopic.php?t=12156

Posted: Wed Aug 06, 2008 5:21 pm
by Antonio Linares
If you use multiple MdiChilds, then you just have to Hide() the current one and Show() the desired one. Think of it like a folder.

Posted: Wed Aug 06, 2008 6:34 pm
by Silvio
Antonio,
I insert my test sample on top on this message
please can you see it
perhaps I explained you bad

I init from your test2003.prg.
you made a main oWnd where you insert a outlook2003 control


I want select the first menu of the outlook2003 control
when I click on this menu it open to the same oWnd to the right a xbrowse

I can see it

NOW I want select another menu of the outlook2003 control
when I click on this menu it open to the same oWnd to the right another xbrowse with another dbf

I can see it BUT there is also the first xbrowse into

Posted: Wed Aug 06, 2008 7:04 pm
by Silvio
On Main Window

Code: Select all

  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




show function

Code: Select all


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 )



the other funcs to open different dbf

Code: Select all





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




I use tpanel class but I am sure there is another method

Posted: Wed Aug 06, 2008 7:04 pm
by Antonio Linares
Do you want to open a different mdichild on the right side ?

Posted: Wed Aug 06, 2008 8:10 pm
by Antonio Linares
Silvio,

Code: Select all

  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() )