FOLDEREX NO SE ACTIVA AL PRESIONAR BOTON 1
Posted: Sat Feb 11, 2012 12:20 am
#include "FiveWin.ch"
static oWn2
//----------------------------------------------------------------------------//
Function SISING()
if "SISING" $ ProcName(1)
return
endif
DEFINE WINDOW oWn2 from 0,0 to 44.9,125 TITLE "A Window"
ACTIVATE WINDOW oWn2 ;
ON INIT TestDialog()
return nil
//-------------------//
Function TestDialog()
local oDlg, oBtn[11], oFld, vFl := 1, oFont
LOCAL oObj[15],;
vVar := { "Space(08)",;
"Space(08)",;
"Space(08)",;
"Space(08)",;
"Space(08)",;
"Space(08)",;
"Space(08)",;
"Space(08)",;
"Space(08)",;
"Space(08)",;
"Space(08)",;
"Space(08)",;
"Space(08)",;
"Space(08)",;
"Space(08)" }
DEFINE FONT oFont NAME "Arial" SIZE 0, -16
DEFINE DIALOG oDlg RESOURCE "MANTENIMIENTOS3" FONT oF oWn2
REDEFINE BTNBMP oBtn[01] ID 170 RESOURCE 1290 OF oDlg ACTION (vFl := 1,ChangeDlg( oFld,1,oDlg))
REDEFINE BTNBMP oBtn[02] ID 180 RESOURCE 1280 OF oDlg ACTION (vFl := 2,ChangeDlg( oFld,2 ))
REDEFINE BTNBMP oBtn[03] ID 190 RESOURCE 1270 OF oDlg ACTION (vFl := 3,ChangeDlg( oFld,3 ))
REDEFINE BTNBMP oBtn[04] ID 200 RESOURCE 1291 OF oDlg ACTION (vFl := 4,ChangeDlg( oFld,4 ))
REDEFINE BTNBMP oBtn[05] ID 210 RESOURCE 1210 OF oDlg ACTION (vFl := 5,ChangeDlg( oFld,5 ))
REDEFINE BTNBMP oBtn[06] ID 240 RESOURCE 1240 OF oDlg ACTION oWn2:End()
REDEFINE FOLDEREX oFld ID 101 PROMPT "Turno "+Space(20),"Opción 2 "+Space(10) OF oDlg;
BITMAPS "new","new";
DIALOGS "TURNO","";
ROUND
If vFl = 1
REDEFINE GET oObj[01] VAR vVar ID 125 OF oFld:aDialogs[ 1 ] UPDATE
REDEFINE GET oObj[02] VAR vVar ID 104 OF oFld:aDialogs[ 1 ] UPDATE
REDEFINE GET oObj[03] VAR vVar ID 103 OF oFld:aDialogs[ 1 ] UPDATE
REDEFINE GET oObj[04] VAR vVar ID 102 OF oFld:aDialogs[ 1 ] UPDATE
REDEFINE GET oObj[05] VAR vVar ID 111 OF oFld:aDialogs[ 1 ] UPDATE
REDEFINE GET oObj[06] VAR vVar ID 105 OF oFld:aDialogs[ 1 ] UPDATE
REDEFINE GET oObj[07] VAR vVar ID 108 OF oFld:aDialogs[ 1 ] UPDATE
REDEFINE GET oObj[08] VAR vVar ID 109 OF oFld:aDialogs[ 1 ] UPDATE
REDEFINE GET oObj[09] VAR vVar ID 107 OF oFld:aDialogs[ 1 ] UPDATE
REDEFINE GET oObj[10] VAR vVar ID 106 OF oFld:aDialogs[ 1 ] UPDATE
REDEFINE GET oObj[11] VAR vVar ID 112 OF oFld:aDialogs[ 1 ] UPDATE
REDEFINE GET oObj[12] VAR vVar ID 116 OF oFld:aDialogs[ 1 ] UPDATE
REDEFINE GET oObj[13] VAR vVar ID 117 OF oFld:aDialogs[ 1 ] UPDATE
REDEFINE GET oObj[14] VAR vVar ID 115 OF oFld:aDialogs[ 1 ] UPDATE
REDEFINE GET oObj[15] VAR vVar ID 114 OF oFld:aDialogs[ 1 ] UPDATE
Endi
oFld:SetOption( 1 )
oFld:EnableTab( 1 )
REDEFINE BTNBMP oBtn[07] ID 102 RESOURCE 5170 OF oDlg
REDEFINE BTNBMP oBtn[08] ID 103 RESOURCE 5180 OF oDlg
REDEFINE BTNBMP oBtn[09] ID 104 RESOURCE 5190 OF oDlg
REDEFINE BTNBMP oBtn[10] ID 105 RESOURCE 5210 OF oDlg
REDEFINE BTNBMP oBtn[11] ID 106 RESOURCE 5240 OF oDlg
ACTIVATE DIALOG oDlg NOWAIT ON INIT (oDlg:Move(0,0))
oFont:End()
return nil
//--------------------------//
Function ChangeDlg( oFld,vFl,oDlg )
Local mdlg:={}, i, nVez, nTit:={}
For i:=1 to LEN(oFld:aPrompts)
oFld:aDialogs[ i ]:bValid = nil
oFld:aDialogs[ i ]:End()
oFld:aPrompts[ i ]:="Opción "+Space(10)+Trans(i,"99")
Next
Do Case
Case vFl = 1
nVez := 1
nTit:={"Turnos"}
mdlg = {"TURNO"}
Case vFl = 2
nVez := 1
nTit:={"Eventos"}
mdlg = {"Eventos"}
Case vFl = 3
nVez := 2
nTit:={"Personales","Generales"}
mdlg = {"EMPSUB1","EMPSUB2"}
Case vFl = 4
nVez := 1
nTit:={"Seguridad"}
mdlg = {"EMPSUB4"}
Case vFl = 5
nVez := 1
nTit:={"Reportes"}
mdlg = {"EMPSUB4"}
Endc
For i := 1 to nVez
oFld:aPrompts:=nTit[ i ]
DEFINE DIALOG oFld:aDialogs[ i ] RESOURCE mdlg OF oFld ;
FONT oFld:oFont
ACTIVATE DIALOG oFld:aDialogs[ i ] NOWAIT ;
ON INIT oFld:aDialogs[ i ]:Move( oFld:nFolderHeight - 1, 1 ) ;
VALID .f.
oFld:aDialogs[ i ]:SetSize( oFld:nWidth() - 4,;
oFld:nHeight() - oFld:nFolderHeight - 2 )
oFld:aDialogs[ i ]:AEvalWhen()
Next
Return nil
arhivo rc
MANTENIMIENTOS3 DIALOG 5, 3, 662, 396
STYLE WS_CHILD | WS_VISIBLE
FONT 8, "Arial"
{
CONTROL "", -1, "STATIC", SS_BLACKFRAME | WS_CHILD | WS_VISIBLE, 23, 3, 431, 71
CONTROL "", -1, "STATIC", SS_BLACKFRAME | WS_CHILD | WS_VISIBLE, 25, 5, 427, 67
CONTROL "", 170, "TBtnBmp", 0 | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 26, 7, 70, 64
CONTROL "", 180, "TBtnBmp", 0 | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 97, 7, 70, 64
CONTROL "", 190, "TBtnBmp", 0 | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 168, 7, 70, 64
CONTROL "", 200, "TBtnBmp", 0 | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 239, 7, 70, 64
CONTROL "", 210, "TBtnBmp", 0 | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 310, 7, 70, 64
CONTROL "", 240, "TBtnBmp", 0 | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 381, 7, 70, 64
CONTROL "", 101, "TFOLDEREX", 0 | WS_CHILD | WS_VISIBLE, 7, 84, 585, 301
CONTROL "", -1, "STATIC", SS_BLACKFRAME | WS_CHILD | WS_VISIBLE, 599, 98, 55, 287
CONTROL "", 102, "TBtnBmp", 0 | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 602, 103, 50, 42
CONTROL "", 103, "TBtnBmp", 0 | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 602, 161, 50, 42
CONTROL "", 104, "TBtnBmp", 0 | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 602, 219, 50, 42
CONTROL "", 105, "TBtnBmp", 0 | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 602, 279, 50, 42
CONTROL "", 106, "TBtnBmp", 0 | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 602, 337, 50, 42
}
POR FAVOR ALGUNA AYUDA. MUCHAS GRACIAS.
static oWn2
//----------------------------------------------------------------------------//
Function SISING()
if "SISING" $ ProcName(1)
return
endif
DEFINE WINDOW oWn2 from 0,0 to 44.9,125 TITLE "A Window"
ACTIVATE WINDOW oWn2 ;
ON INIT TestDialog()
return nil
//-------------------//
Function TestDialog()
local oDlg, oBtn[11], oFld, vFl := 1, oFont
LOCAL oObj[15],;
vVar := { "Space(08)",;
"Space(08)",;
"Space(08)",;
"Space(08)",;
"Space(08)",;
"Space(08)",;
"Space(08)",;
"Space(08)",;
"Space(08)",;
"Space(08)",;
"Space(08)",;
"Space(08)",;
"Space(08)",;
"Space(08)",;
"Space(08)" }
DEFINE FONT oFont NAME "Arial" SIZE 0, -16
DEFINE DIALOG oDlg RESOURCE "MANTENIMIENTOS3" FONT oF oWn2
REDEFINE BTNBMP oBtn[01] ID 170 RESOURCE 1290 OF oDlg ACTION (vFl := 1,ChangeDlg( oFld,1,oDlg))
REDEFINE BTNBMP oBtn[02] ID 180 RESOURCE 1280 OF oDlg ACTION (vFl := 2,ChangeDlg( oFld,2 ))
REDEFINE BTNBMP oBtn[03] ID 190 RESOURCE 1270 OF oDlg ACTION (vFl := 3,ChangeDlg( oFld,3 ))
REDEFINE BTNBMP oBtn[04] ID 200 RESOURCE 1291 OF oDlg ACTION (vFl := 4,ChangeDlg( oFld,4 ))
REDEFINE BTNBMP oBtn[05] ID 210 RESOURCE 1210 OF oDlg ACTION (vFl := 5,ChangeDlg( oFld,5 ))
REDEFINE BTNBMP oBtn[06] ID 240 RESOURCE 1240 OF oDlg ACTION oWn2:End()
REDEFINE FOLDEREX oFld ID 101 PROMPT "Turno "+Space(20),"Opción 2 "+Space(10) OF oDlg;
BITMAPS "new","new";
DIALOGS "TURNO","";
ROUND
If vFl = 1
REDEFINE GET oObj[01] VAR vVar ID 125 OF oFld:aDialogs[ 1 ] UPDATE
REDEFINE GET oObj[02] VAR vVar ID 104 OF oFld:aDialogs[ 1 ] UPDATE
REDEFINE GET oObj[03] VAR vVar ID 103 OF oFld:aDialogs[ 1 ] UPDATE
REDEFINE GET oObj[04] VAR vVar ID 102 OF oFld:aDialogs[ 1 ] UPDATE
REDEFINE GET oObj[05] VAR vVar ID 111 OF oFld:aDialogs[ 1 ] UPDATE
REDEFINE GET oObj[06] VAR vVar ID 105 OF oFld:aDialogs[ 1 ] UPDATE
REDEFINE GET oObj[07] VAR vVar ID 108 OF oFld:aDialogs[ 1 ] UPDATE
REDEFINE GET oObj[08] VAR vVar ID 109 OF oFld:aDialogs[ 1 ] UPDATE
REDEFINE GET oObj[09] VAR vVar ID 107 OF oFld:aDialogs[ 1 ] UPDATE
REDEFINE GET oObj[10] VAR vVar ID 106 OF oFld:aDialogs[ 1 ] UPDATE
REDEFINE GET oObj[11] VAR vVar ID 112 OF oFld:aDialogs[ 1 ] UPDATE
REDEFINE GET oObj[12] VAR vVar ID 116 OF oFld:aDialogs[ 1 ] UPDATE
REDEFINE GET oObj[13] VAR vVar ID 117 OF oFld:aDialogs[ 1 ] UPDATE
REDEFINE GET oObj[14] VAR vVar ID 115 OF oFld:aDialogs[ 1 ] UPDATE
REDEFINE GET oObj[15] VAR vVar ID 114 OF oFld:aDialogs[ 1 ] UPDATE
Endi
oFld:SetOption( 1 )
oFld:EnableTab( 1 )
REDEFINE BTNBMP oBtn[07] ID 102 RESOURCE 5170 OF oDlg
REDEFINE BTNBMP oBtn[08] ID 103 RESOURCE 5180 OF oDlg
REDEFINE BTNBMP oBtn[09] ID 104 RESOURCE 5190 OF oDlg
REDEFINE BTNBMP oBtn[10] ID 105 RESOURCE 5210 OF oDlg
REDEFINE BTNBMP oBtn[11] ID 106 RESOURCE 5240 OF oDlg
ACTIVATE DIALOG oDlg NOWAIT ON INIT (oDlg:Move(0,0))
oFont:End()
return nil
//--------------------------//
Function ChangeDlg( oFld,vFl,oDlg )
Local mdlg:={}, i, nVez, nTit:={}
For i:=1 to LEN(oFld:aPrompts)
oFld:aDialogs[ i ]:bValid = nil
oFld:aDialogs[ i ]:End()
oFld:aPrompts[ i ]:="Opción "+Space(10)+Trans(i,"99")
Next
Do Case
Case vFl = 1
nVez := 1
nTit:={"Turnos"}
mdlg = {"TURNO"}
Case vFl = 2
nVez := 1
nTit:={"Eventos"}
mdlg = {"Eventos"}
Case vFl = 3
nVez := 2
nTit:={"Personales","Generales"}
mdlg = {"EMPSUB1","EMPSUB2"}
Case vFl = 4
nVez := 1
nTit:={"Seguridad"}
mdlg = {"EMPSUB4"}
Case vFl = 5
nVez := 1
nTit:={"Reportes"}
mdlg = {"EMPSUB4"}
Endc
For i := 1 to nVez
oFld:aPrompts:=nTit[ i ]
DEFINE DIALOG oFld:aDialogs[ i ] RESOURCE mdlg OF oFld ;
FONT oFld:oFont
ACTIVATE DIALOG oFld:aDialogs[ i ] NOWAIT ;
ON INIT oFld:aDialogs[ i ]:Move( oFld:nFolderHeight - 1, 1 ) ;
VALID .f.
oFld:aDialogs[ i ]:SetSize( oFld:nWidth() - 4,;
oFld:nHeight() - oFld:nFolderHeight - 2 )
oFld:aDialogs[ i ]:AEvalWhen()
Next
Return nil
arhivo rc
MANTENIMIENTOS3 DIALOG 5, 3, 662, 396
STYLE WS_CHILD | WS_VISIBLE
FONT 8, "Arial"
{
CONTROL "", -1, "STATIC", SS_BLACKFRAME | WS_CHILD | WS_VISIBLE, 23, 3, 431, 71
CONTROL "", -1, "STATIC", SS_BLACKFRAME | WS_CHILD | WS_VISIBLE, 25, 5, 427, 67
CONTROL "", 170, "TBtnBmp", 0 | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 26, 7, 70, 64
CONTROL "", 180, "TBtnBmp", 0 | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 97, 7, 70, 64
CONTROL "", 190, "TBtnBmp", 0 | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 168, 7, 70, 64
CONTROL "", 200, "TBtnBmp", 0 | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 239, 7, 70, 64
CONTROL "", 210, "TBtnBmp", 0 | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 310, 7, 70, 64
CONTROL "", 240, "TBtnBmp", 0 | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 381, 7, 70, 64
CONTROL "", 101, "TFOLDEREX", 0 | WS_CHILD | WS_VISIBLE, 7, 84, 585, 301
CONTROL "", -1, "STATIC", SS_BLACKFRAME | WS_CHILD | WS_VISIBLE, 599, 98, 55, 287
CONTROL "", 102, "TBtnBmp", 0 | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 602, 103, 50, 42
CONTROL "", 103, "TBtnBmp", 0 | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 602, 161, 50, 42
CONTROL "", 104, "TBtnBmp", 0 | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 602, 219, 50, 42
CONTROL "", 105, "TBtnBmp", 0 | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 602, 279, 50, 42
CONTROL "", 106, "TBtnBmp", 0 | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 602, 337, 50, 42
}
POR FAVOR ALGUNA AYUDA. MUCHAS GRACIAS.