Hi Everybody,
I have never used folders before and now have a need to.
I would like to create the folders from resources (Borland Resource Workshop).
Can someone please provide a sample as to how I would create folders.
Thanks,
Jeff
Folders
- Jeff Barnes
- Posts: 912
- Joined: Sun Oct 09, 2005 1:05 pm
- Location: Ontario, Canada
- Contact:
-
- Posts: 108
- Joined: Sun Oct 09, 2005 6:12 pm
- Location: Mar del Plata - Argentina
- Contact:
Re: Folders
Jeff:
// This is the main dialog that contains the folder control
DEFINE DIALOG oDlg RESOURCE "OCOMPRA" ;
TITLE OEMTOANSI("Actualizaci¢n de Orden de Compra N§ ")+LEFT(MOVSTOCK->OCNUM,2)+"-"+;
SUBSTR(MOVSTOCK->OCNUM,3,4)+'-'+RIGHT(MOVSTOCK->OCNUM,4) ;
COLOR CLR_BLACK, RGB(202, 197, 192)
// This is the folder declaration
REDEFINE FOLDER oFld ID 701 OF oDlg ;
PROMPT "Datos Generales","Articulos","Vista Previa","Recibido del proveedor",;
oemtoansi("Env¡os realizados");
DIALOGS "FOLDER_DATOSG" ,"FOLDER_OPMER","OPVPREVIA","ENTREGA3","ENVIOS"
// This is a get that belongs to that main dialog
REDEFINE GET cFecha ID 103 FONT oFont3 OF oDlg PICTURE "@d" UPDATE
// This are controls that belongs to the first folder
REDEFINE GET oNumdoc VAR cOcNum ID 101 FONT oFont1 OF oFld:aDialogs[1] ;
VALID Valnumdoc(oFld,lNew,cXoc,@cOcNum,cEjercicio,oNumdoc,cOcOf) PICTURE "99999";
WHEN (WNRO_NIV == 1)
REDEFINE SAY oEjercicio PROMPT "/ "+SUBSTR(cEjercicio,3,2) ID 118 FONT oFont1 OF oFld:aDialogs[1]
// This to the second folder
REDEFINE SBUTTON OT:oBtn[1] FONT oFont4 ID 121;
RESOURCE "B_RNW","B_RNW","B_RNW" OF oFld:aDialogs[2] ;
PROMPT "&Agrega" ;
ACTION ( TAgrega(),Habilita(),OBACEPTAR:DISABLE(),OBCANCELAR:DISABLE(),oImprimir:Disable(),;
oAceptar:Enable(),oCancelar:enable(),oImprimir:Disable() ) ;
TOOLTIP "Agrega una nueva partida de articulos (Insert)" ;
TEXT POSITION ON_BOTTOM;
LOOK W97
// Finally, you activate the main dialog as usual
ACTIVATE DIALOG oDlg CENTERED VALID OPSALIR(oDlg,oFld,oAceptar,oCancelar,OBACEPTAR,OBCANCELAR,OIMPRIMIR,;
owCodSubp,owNomSubp1,owNomSubp2,@cwCodsubp,@cwNomsubp1,@cwNomsubp2) ;
ON INIT desabilita(oAceptar,oCancelar)
The dialogs in workshop have to be:
-Window type: CHILD
-Dialog style: only visible checked
Regards,
// This is the main dialog that contains the folder control
DEFINE DIALOG oDlg RESOURCE "OCOMPRA" ;
TITLE OEMTOANSI("Actualizaci¢n de Orden de Compra N§ ")+LEFT(MOVSTOCK->OCNUM,2)+"-"+;
SUBSTR(MOVSTOCK->OCNUM,3,4)+'-'+RIGHT(MOVSTOCK->OCNUM,4) ;
COLOR CLR_BLACK, RGB(202, 197, 192)
// This is the folder declaration
REDEFINE FOLDER oFld ID 701 OF oDlg ;
PROMPT "Datos Generales","Articulos","Vista Previa","Recibido del proveedor",;
oemtoansi("Env¡os realizados");
DIALOGS "FOLDER_DATOSG" ,"FOLDER_OPMER","OPVPREVIA","ENTREGA3","ENVIOS"
// This is a get that belongs to that main dialog
REDEFINE GET cFecha ID 103 FONT oFont3 OF oDlg PICTURE "@d" UPDATE
// This are controls that belongs to the first folder
REDEFINE GET oNumdoc VAR cOcNum ID 101 FONT oFont1 OF oFld:aDialogs[1] ;
VALID Valnumdoc(oFld,lNew,cXoc,@cOcNum,cEjercicio,oNumdoc,cOcOf) PICTURE "99999";
WHEN (WNRO_NIV == 1)
REDEFINE SAY oEjercicio PROMPT "/ "+SUBSTR(cEjercicio,3,2) ID 118 FONT oFont1 OF oFld:aDialogs[1]
// This to the second folder
REDEFINE SBUTTON OT:oBtn[1] FONT oFont4 ID 121;
RESOURCE "B_RNW","B_RNW","B_RNW" OF oFld:aDialogs[2] ;
PROMPT "&Agrega" ;
ACTION ( TAgrega(),Habilita(),OBACEPTAR:DISABLE(),OBCANCELAR:DISABLE(),oImprimir:Disable(),;
oAceptar:Enable(),oCancelar:enable(),oImprimir:Disable() ) ;
TOOLTIP "Agrega una nueva partida de articulos (Insert)" ;
TEXT POSITION ON_BOTTOM;
LOOK W97
// Finally, you activate the main dialog as usual
ACTIVATE DIALOG oDlg CENTERED VALID OPSALIR(oDlg,oFld,oAceptar,oCancelar,OBACEPTAR,OBCANCELAR,OIMPRIMIR,;
owCodSubp,owNomSubp1,owNomSubp2,@cwCodsubp,@cwNomsubp1,@cwNomsubp2) ;
ON INIT desabilita(oAceptar,oCancelar)
The dialogs in workshop have to be:
-Window type: CHILD
-Dialog style: only visible checked
Regards,
Jeff Barnes wrote:Hi Everybody,
I have never used folders before and now have a need to.
I would like to create the folders from resources (Borland Resource Workshop).
Can someone please provide a sample as to how I would create folders.
Thanks,
Jeff
Hello Jeff,
This is fix/Enhance Folder function. Below:
Code-PRG
#include "Fivewin.ch"
#include "Folder.ch"
.........
REDEFINE FOLDER ::oFld ID 300 OF ::oDlg ;
PROMPTS "基本資料" , "家屬成員", "現狀圖" ,;
"平面設計圖", "交屋贈品", "業主申訴" ,;
"禮品發送" , "完工照片" ;
DIALOGS "D_DR_WIN_CUSTMSF_FLD1", "D_DR_WIN_CUSTMSF_FLD2",;
"D_DR_WIN_CUSTMSF_FLD3", "D_DR_WIN_CUSTMSF_FLD4",;
"D_DR_WIN_CUSTMSF_FLD5", "D_DR_WIN_CUSTMSF_FLD6",;
"D_DR_WIN_CUSTMSF_FLD7", "D_DR_WIN_CUSTMSF_FLD8" ;
BITMAPS { GetC5MenuIconDir()+"TCustMsf01.ico",;
GetC5MenuIconDir()+"TCustMsf02.ico",;
GetC5MenuIconDir()+"TCustMsf03.ico",;
GetC5MenuIconDir()+"TCustMsf04.ico",;
GetC5MenuIconDir()+"TCustMsf05.ico",;
GetC5MenuIconDir()+"TCustMsf06.ico",;
GetC5MenuIconDir()+"TCustMsf07.ico",;
GetC5MenuIconDir()+"TCustMsf08.ico" }
::oFld:SetFont( oFnt1 )
Resource File
D_DR_WIN_CUSTMSF DIALOG 5, -17, 508, 367
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "客戶基本資料"
FONT 12, "細明體"
{
CONTROL "", 301, "TCBrowse", WS_CHILD | WS_VISIBLE | WS_BORDER | WS_TABSTOP, 1, 274, 506, 80
CONTROL "", 300, "SysTabControl32", 0 | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 1, 19, 506, 254
}
Regards,
Richard Huang
Fivetech.net Taiwan
http://www.fivetech.com.tw
This is fix/Enhance Folder function. Below:
Code-PRG
#include "Fivewin.ch"
#include "Folder.ch"
.........
REDEFINE FOLDER ::oFld ID 300 OF ::oDlg ;
PROMPTS "基本資料" , "家屬成員", "現狀圖" ,;
"平面設計圖", "交屋贈品", "業主申訴" ,;
"禮品發送" , "完工照片" ;
DIALOGS "D_DR_WIN_CUSTMSF_FLD1", "D_DR_WIN_CUSTMSF_FLD2",;
"D_DR_WIN_CUSTMSF_FLD3", "D_DR_WIN_CUSTMSF_FLD4",;
"D_DR_WIN_CUSTMSF_FLD5", "D_DR_WIN_CUSTMSF_FLD6",;
"D_DR_WIN_CUSTMSF_FLD7", "D_DR_WIN_CUSTMSF_FLD8" ;
BITMAPS { GetC5MenuIconDir()+"TCustMsf01.ico",;
GetC5MenuIconDir()+"TCustMsf02.ico",;
GetC5MenuIconDir()+"TCustMsf03.ico",;
GetC5MenuIconDir()+"TCustMsf04.ico",;
GetC5MenuIconDir()+"TCustMsf05.ico",;
GetC5MenuIconDir()+"TCustMsf06.ico",;
GetC5MenuIconDir()+"TCustMsf07.ico",;
GetC5MenuIconDir()+"TCustMsf08.ico" }
::oFld:SetFont( oFnt1 )
Resource File
D_DR_WIN_CUSTMSF DIALOG 5, -17, 508, 367
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "客戶基本資料"
FONT 12, "細明體"
{
CONTROL "", 301, "TCBrowse", WS_CHILD | WS_VISIBLE | WS_BORDER | WS_TABSTOP, 1, 274, 506, 80
CONTROL "", 300, "SysTabControl32", 0 | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 1, 19, 506, 254
}
Regards,
Richard Huang
Fivetech.net Taiwan
http://www.fivetech.com.tw
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
- Jeff Barnes
- Posts: 912
- Joined: Sun Oct 09, 2005 1:05 pm
- Location: Ontario, Canada
- Contact: