COMO UTILIZAR TPAGES DENTRO DE UN FOLDER

COMO UTILIZAR TPAGES DENTRO DE UN FOLDER

Postby busmatic » Sat Jul 29, 2006 4:56 am

uN SALUDITO..

Por Problema de folders que he tenido me han dado una idea de utilizar tpages, bueno me podriaan ayudar con un ejemplo de tulizacion pues nunca en mi vida las he utilizado.

Gracias..
Busmatic
thanks
User avatar
busmatic
 
Posts: 51
Joined: Fri Jun 30, 2006 6:56 pm

Postby Raymundo Islas M. » Sat Jul 29, 2006 5:01 pm

Oscar

Es practicamente identico a usar un folder :

REDEFINE PAGES oPagSrc ID 102 OF oFold:aDialogs[2] DIALOGS "PGMODS","PGSISUB", ;
"PGMPRD","PGFIN"


REDEFINE GET aSrcDts[ 1] ID 103 OF oPagSrc:aDialogs[1] WHEN .F. UPDATE

etc. etc

Una de las diferencias, es que el folder tiene la forma visual caracteristica, mientras que el page es solo una area, yo normalmente la acompaño con algun TABs


SALUDOS
FWH 10.6 + xHarbour + Borland 582
User avatar
Raymundo Islas M.
 
Posts: 592
Joined: Tue Mar 14, 2006 11:34 pm
Location: Acapulco, Gro. MEXICO

Postby Antonio Linares » Sun Jul 30, 2006 4:19 am

Busmatic,

Si lo que necesitas es cambiar dinámicamente un diálogo de un folder por otro diálogo, no es necesario que uses pages.

Vamos a intentar contruirte un ejemplo de como hacerlo.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41940
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Gracias Antonio

Postby busmatic » Mon Jul 31, 2006 11:39 pm

Si antonio
Si el cambio podria llamarse dinamico, pues he provado de toda forma y e llamado a los brujos y sortilejios y nada , es algo un poco estraño o particular diria yo.

Gracias Antonio ya todos, espero mana del cielo

Busmatic
Thanks
User avatar
busmatic
 
Posts: 51
Joined: Fri Jun 30, 2006 6:56 pm

Postby Antonio Linares » Tue Aug 01, 2006 6:11 am

Aqui tienes el ejemplo test.prg :
Code: Select all  Expand view
// Dinamically changing a folder dialog

#include "FiveWin.ch"

function Main()

   local oDlg, oFld
   
   DEFINE DIALOG oDlg RESOURCE "Test"
   
   REDEFINE FOLDER oFld ID 10 OF oDlg ;
      PROMPTS "One", "Two", "Three" ;
      DIALOGS "dlg1", "dlg2", "dlg3"
     
   REDEFINE BUTTON ID 20 OF oFld:aDialogs[ 2 ] ;
      ACTION ChangeDlg( oFld )   
   
   ACTIVATE DIALOG oDlg CENTERED
   
return nil   

function ChangeDlg( oFld )

   oFld:aDialogs[ 2 ]:bValid = nil
   oFld:aDialogs[ 2 ]:End()

   DEFINE DIALOG oFld:aDialogs[ 2 ] RESOURCE "dlg4" OF oFld ;
      FONT oFld:oFont
   
   ACTIVATE DIALOG oFld:aDialogs[ 2 ] NOWAIT ;
      ON INIT oFld:aDialogs[ 2 ]:Move( oFld:nFdHeight - 1, 1 ) ;
      VALID .f.
     
   oFld:aDialogs[ 2 ]:SetSize( oFld:nWidth() - 4,;
                               oFld:nHeight() - oFld:nFdHeight - 2 )   
   
return nil   

y el recurso test.rc :
Code: Select all  Expand view
test DIALOG 56, 54, 194, 148
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "Test"
FONT 8, "MS Sans Serif"
{
CONTROL "", 10, "SysTabControl32", 0 | WS_CHILD | WS_VISIBLE, 8, 9, 178, 114
DEFPUSHBUTTON "OK", IDOK, 42, 128, 50, 16
PUSHBUTTON "Cancel", IDCANCEL, 102, 128, 50, 16
}

dlg1 DIALOG 18, 18, 134, 84
STYLE WS_CHILD | 4
{
LTEXT "First page:", 10, 22, 17, 48, 8
EDITTEXT 10, 22, 30, 65, 11
}

dlg2 DIALOG 18, 18, 134, 84
STYLE WS_CHILD | 4
{
LTEXT "Second page:", 10, 22, 17, 48, 8
EDITTEXT 10, 22, 30, 65, 11
PUSHBUTTON "Change", 20, 45, 57, 44, 12
}

dlg3 DIALOG 18, 18, 134, 84
STYLE WS_CHILD | 4
{
LTEXT "Third page:", 10, 22, 17, 48, 8
EDITTEXT 10, 22, 30, 65, 11
}

dlg4 DIALOG 18, 18, 134, 84
STYLE WS_CHILD | 4
{
LTEXT "Fourth page:", 10, 22, 17, 48, 8
EDITTEXT 10, 22, 30, 65, 11
}
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41940
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Muchas Gracias Antonio

Postby busmatic » Tue Aug 01, 2006 3:13 pm

Perfecto, mil gracias, exactamente era lo quu deseaba, he para mucho este tipo de programacion a veces en dificil pue no tenemos la mente para hacerlo pues tanto probamos que nada sale. Gracias por contribuir a la causa.

Oscar Chacon
Bumatic.
User avatar
busmatic
 
Posts: 51
Joined: Fri Jun 30, 2006 6:56 pm


Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 128 guests