tFolder

Post Reply
User avatar
pablovidal
Posts: 398
Joined: Thu Oct 06, 2005 10:15 pm
Location: Republica Dominicana
Contact:

tFolder

Post by pablovidal »

Saludos Amigos:

Tengo un dilema con la tFolder, que es el siguiente:

Los Prompts del Folder pueden ser variables tomados desde un array y los dialogs son los mismo:

Code: Select all

REDEFINE FOLDER o:oFolder ID 1211 OF o:oDlg PROMPTS "Pestaña 1", "Pestaña 2", "Pestaña 3","Pestaña 4" DIALOGS "DLG_BOTE_01","DLG_BOTE_01","DLG_BOTE_01","DLG_BOTE_01"
 
Donde dice Pestañas # es variable estos datos lo tomaremos desde un array
Saludos,

Pablo Alberto Vidal
/*
------------------------------------------------------
Harbour 3.2.0, Fivewin 17.02, BCC7
------------------------------------------------------
*/
User avatar
Daniel Garcia-Gil
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 pm
Location: Isla de Margarita
Contact:

Re: tFolder

Post by Daniel Garcia-Gil »

Saludos Pablo...

Hasta los momentos no entiendo cual es el dilema o la duda que tienes, puedes er mas especifico por favor
our best documentation is the source code
Isla de Margarita Venezuela.
danielgarciagil@gmail.com
http://tdolphin.blogspot.com/
https://www.dropbox.com/referrals/NTI5N ... rc=global9
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: tFolder

Post by Antonio Linares »

Pablo,

Tal vez te refieras a esto:

Desde la claúsula ON INIT del diálogo puedes cambiar los prompts del folder:

Code: Select all

ACTIVATE DIALOG oDlg ;
   ON INIT oFolder:SetPrompts( { "Uno", "Dos", "Tres", "Cuatro" } )
 
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
pablovidal
Posts: 398
Joined: Thu Oct 06, 2005 10:15 pm
Location: Republica Dominicana
Contact:

Re: tFolder

Post by pablovidal »

Gracias por responder,

Antonio el Dilema es que cuando necesito crear el Folder los Prompts necesito tomarlos desde un array, y estos son variables, pueden ser 2,3,4,5,.... prompts.

Inteto hacer esto, y no funciona...

Code: Select all

   o:oFolder := TFolder():ReDefine( 1211,,,o:oDlg,,,,, .F. )
   o:oFolder:AddItem( "Pestaña 01", "DLG_BOTE_01" )
   o:oFolder:AddItem( "Pestaña 02", "DLG_BOTE_01" )
   o:oFolder:AddItem( "Pestaña 03", "DLG_BOTE_01" )
   o:oFolder:AddItem( "Pestaña 04", "DLG_BOTE_01" )
 
Saludos,

Pablo Alberto Vidal
/*
------------------------------------------------------
Harbour 3.2.0, Fivewin 17.02, BCC7
------------------------------------------------------
*/
User avatar
Daniel Garcia-Gil
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 pm
Location: Isla de Margarita
Contact:

Re: tFolder

Post by Daniel Garcia-Gil »

Pablo

No hay problema puedes hacerlo

te expongo un ejemplo

Code: Select all

#include "FiveWin.ch"
#include "Folder.ch"

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

function Main()

   local oDlg, oFld1, oFld2
   local cItem
   local aTabs := { "&Clipper", "&and", "&Windows", "&Magic" }
   local aDialog := { "Sub1", "Sub2" }

   SET _3DLOOK ON

   DEFINE DIALOG oDlg RESOURCE "Test"


   oFld1 = tFolder():Redefine( 110, aTabs, aDialog, oDlg ) 

   REDEFINE COMBOBOX cItem ITEMS { "One", "Two", "Three" } ;
      ID 105 OF oFld1:aDialogs[ 1 ]

   REDEFINE BUTTON ID 110 OF oFld1:aDialogs[ 1 ] ;  
      ACTION MsgInfo( "First Page" )                

   REDEFINE BUTTON ID 104 OF oFld1:aDialogs[ 2 ] ;   
      ACTION MsgInfo( "Second Page" )               

   REDEFINE FOLDER oFld2 ID 120 OF oDlg ;
      PROMPT "&The", "&beauty", "&and power", "&of xBase" ;
      DIALOGS "The", "Beauty"


   ACTIVATE DIALOG oDlg CENTERED

return nil
aTabs y aDialog _ segun las necesidades de tu sistema pueden tener 1,3,7,9 elementos

RC...

Code: Select all

#define IDC_CHECKBOX1   106
#define IDC_GROUPBOX1   107
#define DIALOG_2    2
#define DIALOG_1    1
#include "..\include\winapi.ch"

#ifdef __FLAT__
   1 24 "winxp\WindowsXP.Manifest"
#endif

#ifdef __64__
   1 24 "WinXP/WindowsXP.Manifest64"
#endif 


Test DIALOG 19, 22, 263, 202
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | 4
CAPTION "FiveWin Folders Demo"
FONT 8, "Arial"
{
 CONTROL "", 110, FOLDER32, 0 | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 4, 5, 213, 93
 CONTROL "", 120, FOLDER32, 0 | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 4, 105, 213, 93
 PUSHBUTTON "&OK", 1, 222, 4, 37, 14
}


sub1 DIALOG 18, 18, 142, 67
STYLE WS_CHILD | 0x4
{
 COMBOBOX 105, 62, 15, 69, 37, CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_TABSTOP
 PUSHBUTTON "&First", 110, 25, 47, 24, 14
 PUSHBUTTON "&SubDialog", 120, 54, 47, 43, 14
 CHECKBOX "Checkbox", IDC_CHECKBOX1, 35, 27, 60, 12, BS_AUTOCHECKBOX | WS_TABSTOP
 GROUPBOX "Group", IDC_GROUPBOX1, 8, 6, 129, 35, BS_GROUPBOX
}


sub2 DIALOG 18, 18, 142, 67
STYLE WS_CHILD | 0x4
{
 CONTROL "Text", 101, "BUTTON", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_GROUP | WS_TABSTOP, 37, 30, 28, 12
 CONTROL "Text", 102, "BUTTON", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 37, 41, 28, 12
 CONTROL "Text", 103, "BUTTON", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 37, 52, 28, 12
 CONTROL "&Second", 104, "BUTTON", BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 93, 26, 32, 12
}


the DIALOG 18, 18, 142, 67
STYLE WS_CHILD | 0x4
{
 CONTROL "Wellcome to the most", -1, "STATIC", SS_LEFT | WS_CHILD | WS_VISIBLE, 26, 13, 74, 8
 CONTROL "fascinating way of", -1, "STATIC", SS_LEFT | WS_CHILD | WS_VISIBLE, 27, 26, 62, 8
 CONTROL "developing software", -1, "STATIC", SS_LEFT | WS_CHILD | WS_VISIBLE, 26, 40, 74, 8
}


beauty DIALOG 18, 18, 142, 67
STYLE WS_CHILD | 0x4
{
 CONTROL "Now you have all the", -1, "STATIC", SS_LEFT | WS_CHILD | WS_VISIBLE, 26, 13, 74, 8
 CONTROL "productivity and power", -1, "STATIC", SS_LEFT | WS_CHILD | WS_VISIBLE, 27, 26, 78, 8
 CONTROL "you were looking for!", -1, "STATIC", SS_LEFT | WS_CHILD | WS_VISIBLE, 26, 40, 74, 8
}
our best documentation is the source code
Isla de Margarita Venezuela.
danielgarciagil@gmail.com
http://tdolphin.blogspot.com/
https://www.dropbox.com/referrals/NTI5N ... rc=global9
User avatar
pablovidal
Posts: 398
Joined: Thu Oct 06, 2005 10:15 pm
Location: Republica Dominicana
Contact:

Re: tFolder

Post by pablovidal »

Gracias Daniel, diste en el punto...
Saludos,

Pablo Alberto Vidal
/*
------------------------------------------------------
Harbour 3.2.0, Fivewin 17.02, BCC7
------------------------------------------------------
*/
pacotre
Posts: 40
Joined: Fri Jan 10, 2014 10:38 am

Re: tFolder

Post by pacotre »

Hola:
Necesito saber en un FOLDER como identificar la pestaña que se ha abierto para ejecutar determinadas acciones.
Gracias
User avatar
carlos vargas
Posts: 1421
Joined: Tue Oct 11, 2005 5:01 pm
Location: Nicaragua

Re: tFolder

Post by carlos vargas »

the data
:nOption
Salu2
Carlos Vargas
Desde Managua, Nicaragua (CA)
pacotre
Posts: 40
Joined: Fri Jan 10, 2014 10:38 am

Re: tFolder

Post by pacotre »

Gracias Carlos
pacotre
Posts: 40
Joined: Fri Jan 10, 2014 10:38 am

Re: tFolder

Post by pacotre »

Me queda otra duda.
Cuando voy a abrir la carpeta 7, si no cumple las condiciones quiero que vuelva a abrir la carpeta 1 y no la 7.
Lo he intentando de varias formas pero no lo consigo
If(oFld:noption=7 .and. !cumple, oFld:noPtion=1,)

Pero así no funciona, sigue en vigor el valor 7

Como debo hacerlo para que vuelva a la carpeta 1?

Gracias
User avatar
karinha
Posts: 4882
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: tFolder

Post by karinha »

João Santos - São Paulo - Brasil
Post Reply