FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Sample test with tpages
Posts: 7318
Joined: Thu Oct 18, 2012 07:17 PM
Sample test with tpages
Posted: Tue Sep 23, 2014 10:42 AM
I 'm trying to use Tpages class.
I cannot use resources and I wish use @x,y source code
I wish create a small dialog with two pages
On second page I insert some controls but when I run the test I not see good all controls .. why ?

this is the test source I tried :



Code (fw): Select all Collapse
#include "FiveWin.ch"
#include "constant.ch"


Function Test()

   Local oDlgLicenza
   Local  nBottom   := 27
   Local  nRight    := 55
   Local  nWidth :=  Max( nRight * DLG_CHARPIX_W, 180 )
   Local  nHeight := nBottom * DLG_CHARPIX_H

   Local cTitolo,cNome,cCognome,cEmail,cRipEmail,cVia,cCodicePostale,cCitta,cPaese,cTelefono
   Local cLicenza

   Local aTitolo:= {"Selezionare","Sig.re","Sig.ra"}
   Local oPages
   local oDlg1, oDlg2
   Local  obtnPre,obtnNext,obtnExit


   DEFINE FONT oFont NAME 'Tahoma' SIZE 0, -14
   SetGetColorFocus()


    DEFINE DIALOG oDlgLicenza          ;
         SIZE nWidth, nHeight   PIXEL  ;
          TITLE "Test "  
 
          oPages:= TPages():New( 00, 2, 180, 216, oDlgLicenza )



   DEFINE DIALOG oDlg1  OF oPages   STYLE WS_CHILD    


       @   10,  5 SAY "Numero attivazione :  "+STR( nSerialHD() ) PIXEL OF oDlg1


   oPages:AddPage( oDlg1 )


//--------------------------------------------------------------------------------//

 DEFINE DIALOG oDlg2  OF oPages   STYLE WS_CHILD




    @    10,  5 SAY "Titolo *:" SIZE  25,   10 PIXEL  OF oDlg2  COLOR 0, 14215660
    @    10,  55 COMBOBOX  aProf[1] VAR cTitolo ITEMS aTitolo SIZE  55,  12  PIXEL  OF oDlg2

    @    26, 5 SAY "Nome :" OF oDlg2 SIZE 55, 10 PIXEL    FONT oFont
    @    23, 55 GET aProf[1] VAR cNome OF oDlg2 SIZE 55, 12 PIXEL    UPDATE

    @    26, 115 SAY "Cognome:" OF oDlg2 SIZE 55, 10 PIXEL
    @    23, 175 GET aProf[2] VAR cCognome   OF oDlg2 SIZE 105, 12 PIXEL   UPDATE

    @    49, 5 SAY "Email:" OF oDlg2 SIZE 55, 10 PIXEL
    @    43, 55 GET aProf[3] VAR cEmail   OF oDlg2 SIZE 205, 12 PIXEL   UPDATE











   oPages:AddPage( oDlg2 )
   oPages:SetOption( 1 )



      @ 185,55 BUTTON obtnPre PROMPT "< Indietro"  SIZE 40, 12 ACTION oPages:GoPrev()  PIXEL  OF oDlgLicenza
      @ 185,98 BUTTON obtnNext PROMPT "Avanti >"   SIZE 40, 12 ACTION oPages:GoNext()  PIXEL  OF oDlgLicenza
      @ 185,140 BUTTON obtnExit PROMPT "Annulla"  SIZE 40, 12 ACTION ( oDlgLicenza:end( IDCANCEL ) )  PIXEL  OF oDlgLicenza

      ACTIVATE DIALOG oDlgLicenza


Someone can help me please ?
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 7318
Joined: Thu Oct 18, 2012 07:17 PM
Re: Sample test with tpages
Posted: Wed Sep 24, 2014 12:44 PM

Any help please ?

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: Sample test with tpages
Posted: Wed Sep 24, 2014 05:10 PM

Look samples\TestPag2.prg.

Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo

El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 7318
Joined: Thu Oct 18, 2012 07:17 PM
Re: Sample test with tpages
Posted: Wed Sep 24, 2014 05:34 PM

resolved!!
ACTIVATE DIALOG oDlgLicenza CENTERED;
ON INIT (oPages:Move( 0, 0, oDlgLicenza:nWidth, oDlgLicenza:nHeight-80 ))

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com

Continue the discussion