BROWSE DESDE FOLDER

BROWSE DESDE FOLDER

Postby mag071 » Wed May 09, 2007 5: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
User avatar
mag071
 
Posts: 140
Joined: Thu Feb 02, 2006 12:09 pm
Location: Venezuela

Postby Antonio Linares » Wed May 09, 2007 7: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
User avatar
Antonio Linares
Site Admin
 
Posts: 42078
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Folder con Browse

Postby mag071 » Thu May 10, 2007 3: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
User avatar
mag071
 
Posts: 140
Joined: Thu Feb 02, 2006 12:09 pm
Location: Venezuela

Postby Antonio Linares » Thu May 10, 2007 10:09 am

Mario,

Asi funciona bien:
Code: Select all  Expand view
#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   

Image
regards, saludos

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

Postby mag071 » Thu May 10, 2007 9: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
User avatar
mag071
 
Posts: 140
Joined: Thu Feb 02, 2006 12:09 pm
Location: Venezuela

Postby Antonio Linares » Mon May 14, 2007 10:18 am

bien :-)
regards, saludos

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


Return to FiveWin para Pocket PC

Who is online

Users browsing this forum: No registered users and 40 guests