FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Pocket PC BROWSE DESDE FOLDER
Posts: 140
Joined: Thu Feb 02, 2006 12:09 PM
BROWSE DESDE FOLDER
Posted: Wed May 09, 2007 05:24 AM

Necesito crear un folder que algunos de los dialogos tengan listbox tomo el ejemplo testfld y le añado una pestaña mas con un listbox y me genera el siguiente error :
Can´t create dialogbox y despues me dice que no esta Identificado el control
Non defined Id No. 10
aqui esta el codigo fuente

include "FWCE.ch"

function Main()

local oWnd, cValue, cText := "Hello world!"

DEFINE WINDOW oWnd TITLE "Folders"

@ 0.5, 1 FOLDER oFld PROMPTS "One", "Two" , "Three" ;
DIALOGS "sub1", "sub2" , "sub3" ;
SIZE 225, 245

REDEFINE COMBOBOX cValue ID 100 OF oFld:aDialogs[ 1 ] ;
ITEMS { "Red", "Green", "Blue" }

REDEFINE BUTTON ID 110 OF oFld:aDialogs[ 1 ] ACTION MsgInfo( "click" )

REDEFINE BUTTON ID 120 OF oFld:aDialogs[ 1 ] ACTION MsgInfo( cValue )

REDEFINE BUTTON ID 104 OF oFld:aDialogs[ 2 ] ACTION MsgInfo( "Second dialog" )

REDEFINE GET cText ID 106 OF oFld:aDialogs[ 2 ] COLOR "GR+/G"

REDEFINE LISTBOX oLbx FIELDS First, Last ID 10 OF oFld:aDialogs[ 3 ]

REDEFINE BUTTON ID 130 OF oFld:aDialogs[ 3 ] ACTION MsgInfo( "click" )
REDEFINE BUTTON ID 140 OF oFld:aDialogs[ 3 ] ACTION MsgInfo( "click" )
REDEFINE BUTTON ID 150 OF oFld:aDialogs[ 3 ] ACTION MsgInfo( "click" )
REDEFINE BUTTON ID 160 OF oFld:aDialogs[ 3 ] ACTION MsgInfo( "click" )
REDEFINE BUTTON ID 170 OF oFld:aDialogs[ 3 ] ACTION MsgInfo( "click" )
REDEFINE BUTTON ID 180 OF oFld:aDialogs[ 3 ] ACTION MsgInfo( "click" )

oFld:InitDialogs() // required to initialize the resources dialogs !

ACTIVATE WINDOW oWnd

return nil

y este el añadido al .rc
sub3 DIALOG 18, 18, 129, 128
STYLE WS_CHILD | 4
{
CONTROL "", 10, "TWBrowse", 0 | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP, 3, 5, 122, 64
PUSHBUTTON "&Incl.", 130, 2, 72, 17, 14
PUSHBUTTON "&Borr.", 140, 20, 72, 17, 14
PUSHBUTTON "&Copia", 150, 38, 72, 17, 14
PUSHBUTTON "&Ver ", 160, 56, 72, 17, 14
PUSHBUTTON "&Total", 170, 74, 72, 17, 14
PUSHBUTTON "&Salir", 180, 92, 72, 17, 14
}

si comento el TWBrowse en el RC y el REDEFINE del mismo en el PRG si me muestra la pestaña los botones.
en conclusion deseo mostrar en pestañas TWBrowse que debo hacer.

de antemano muchas Gracias.

Mario Antonio González Osal

Venezuela

m a g 0 7 1 @ g m a i l. c o m
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
BROWSE DESDE FOLDER
Posted: Wed May 09, 2007 07:17 AM
Mario,

Prueba a incluir esta línea en el PRG:

#include "FWCE.ch"

function Main()

local oWnd, cValue, cText := "Hello world!"

DEFINE WINDOW oWnd TITLE "Folders"

TWBrowse()

@ 0.5, 1 FOLDER oFld PROMPTS "One", "Two" , "Three" ;
DIALOGS "sub1", "sub2" , "sub3" ;
SIZE 225, 245

...
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 140
Joined: Thu Feb 02, 2006 12:09 PM
Folder con Browse
Posted: Thu May 10, 2007 03:02 AM

Antonio

Gracias por responder pero Incluyo la Linea TWBrowse()
y sigue generando el mismo error.

Mario Antonio González Osal

Venezuela

m a g 0 7 1 @ g m a i l. c o m
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
BROWSE DESDE FOLDER
Posted: Thu May 10, 2007 10:09 AM
Mario,

Asi funciona bien:
#include "FWCE.ch"

function Main()

   local oWnd, cValue, cText := "Hello world!", oLbx
   
   DEFINE WINDOW oWnd TITLE "Folders"
   
   USE ( CurDir() + "\Customer" )
      
   oLbx := TWBrowse():New( 100, 100 )   
   oLbx:End()
      
   @ 0.5, 1 FOLDER oFld PROMPTS "One", "Two", "Three" ;
      DIALOGS "sub1", "sub2", "sub3" ;
      SIZE 225, 245

   REDEFINE COMBOBOX cValue ID 100 OF oFld:aDialogs[ 1 ] ;
      ITEMS { "Red", "Green", "Blue" }
   
   REDEFINE BUTTON ID 110 OF oFld:aDialogs[ 1 ] ACTION MsgInfo( "click" )

   REDEFINE BUTTON ID 120 OF oFld:aDialogs[ 1 ] ACTION MsgInfo( cValue )

   REDEFINE BUTTON ID 104 OF oFld:aDialogs[ 2 ] ACTION MsgInfo( "Second dialog" )
   
   REDEFINE GET cText ID 106 OF oFld:aDialogs[ 2 ] COLOR "GR+/G"

   REDEFINE LISTBOX oLbx FIELDS First, Last ID 10 OF oFld:aDialogs[ 3 ]    
   
   oFld:InitDialogs() // required to initialize the resources dialogs !
   
   ACTIVATE WINDOW oWnd
   
return nil

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 140
Joined: Thu Feb 02, 2006 12:09 PM
BROWSE DESDE FOLDER
Posted: Thu May 10, 2007 09:00 PM

Muy Agradecido
ahora si funciona Ok.

Mario Antonio González Osal

Venezuela

m a g 0 7 1 @ g m a i l. c o m
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
BROWSE DESDE FOLDER
Posted: Mon May 14, 2007 10:18 AM

bien :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion