Estoy intentando hacer esto:
- Code: Select all Expand view
- IF ( HB_ArgV( 1 ) == "desarrollo" )
::oBtns[2]:show()
::oBtns[2]:baction := { || ::reset() }
ELSE
::oBtns[2]:hide()
ENDIF
pero cuando hb_argv(1) NO es igual a "desarrollo" no lo oculta.
IF ( HB_ArgV( 1 ) == "desarrollo" )
::oBtns[2]:show()
::oBtns[2]:baction := { || ::reset() }
ELSE
::oBtns[2]:hide()
ENDIF
IF ( HB_ArgV( 1 ) == "desarrollo" )
::oBtns[2]:show()
::oBtns[2]:baction := { || ::reset() }
ELSE
MsgInfo( "aqui" )
::oBtns[2]:hide()
ENDIF
::oBtns[2]:Disable()
::oBtns[2]:hide()
::oBtns[2]:Refresh()
DEFINE DIALOG ::oDlg resource "DLGMAIN" TITLE FWString( 7 ) + " Sucursal " + AllTrim( Str( 1 ) ) + " [" + IIf( HB_ArgV( 1 ) == "desarrollo", "DESARROLLO", "PRODUCCION" ) + " ]"
::setGets()
::setBtns()
//----------( )----------
::oBtns[ 1 ]:bAction := { || ::agregarFactura() }
IF ( HB_ArgV( 1 ) == "desarrollo" )
::oBtns[ 2 ]:show()
::oBtns[ 2 ]:baction := { || ::reset() }
ELSE
::oBtns[2]:hide()
::obtns[2]:refresh()
? "pasa"
ENDIF
//----------( )----------
DragAcceptFiles( ::oDlg:hWnd, .T. )
::oDlg:bDropFiles := { | nRow, nCol, uDropInfo | IIf( ! ::lConsulta, ::obtenerDatos( uDropInfo ), MsgStop( "No" ) ) }
ACTIVATE DIALOG ::oDlg CENTERED ON INIT ( ;
this:oDlg:setMenu( this:buildMenu() ), ;
this:inicializar( ), ;
this:limpiarGets() ;
) ;
METHOD setBtns() CLASS TImportarXML
REDEFINE BUTTON ::oBtns[ 1 ] ID 400 OF ::oDlg
REDEFINE BUTTON ::oBtns[ 2 ] ID 410 OF ::oDlg
::oBtns[ 1 ]:disable()
RETURN( NIL )
DLGMAIN DIALOGEX DISCARDABLE 6, 18, 799, 362
STYLE DS_SHELLFONT|WS_POPUP|DS_MODALFRAME|DS_CONTEXTHELP|DS_3DLOOK|WS_CAPTION|WS_SYSMENU|WS_VISIBLE
EXSTYLE WS_EX_ACCEPTFILES
CAPTION "Esportazione di file XML"
FONT 8, "Tahoma", 0, 0, 1
{
CONTROL "500", 500, "Static", SS_CENTER|WS_GROUP, 24, 37, 84, 41
CONTROL "501", 501, "Button", BS_GROUPBOX, 123, 12, 273, 81
CONTROL "Cliente:", 502, "Static", SS_RIGHT|WS_GROUP, 131, 34, 54, 8
CONTROL "Edit", 200, "Edit", ES_AUTOHSCROLL|WS_BORDER|WS_TABSTOP, 190, 32, 190, 12
CONTROL "Indirizzo:", 503, "Static", SS_RIGHT|WS_GROUP, 131, 51, 54, 8
CONTROL "Edit", 202, "Edit", ES_AUTOHSCROLL|WS_BORDER|WS_TABSTOP, 190, 50, 190, 12
CONTROL "CAP:", 504, "Static", SS_RIGHT|WS_GROUP, 131, 70, 54, 8
CONTROL "Edit", 204, "Edit", ES_AUTOHSCROLL|WS_BORDER|WS_TABSTOP, 190, 68, 31, 12
CONTROL "Comuna:", 505, "Static", SS_RIGHT|WS_GROUP, 228, 70, 31, 8
CONTROL "Edit", 206, "Edit", ES_AUTOHSCROLL|WS_BORDER|WS_TABSTOP, 264, 68, 63, 12
CONTROL "Prov.:", 4001, "Static", SS_RIGHT|WS_GROUP, 330, 70, 25, 8
CONTROL "Edit", 208, "Edit", ES_AUTOHSCROLL|WS_BORDER|WS_TABSTOP, 359, 68, 21, 12
CONTROL "506", 506, "Button", BS_GROUPBOX, 17, 100, 175, 173
CONTROL "Id fattura:", 4003, "Static", SS_RIGHT|WS_GROUP, 37, 123, 57, 8
CONTROL "Edit", 210, "Edit", ES_AUTOHSCROLL|WS_BORDER|WS_TABSTOP, 99, 121, 79, 12
CONTROL "Codice fiscale:", 4006, "Static", SS_RIGHT|WS_GROUP, 37, 141, 57, 8
CONTROL "Edit", 212, "Edit", ES_AUTOHSCROLL|WS_BORDER|WS_TABSTOP, 99, 139, 79, 12
CONTROL "Imponibile:", 507, "Static", SS_RIGHT|WS_GROUP, 37, 165, 57, 8
CONTROL "Edit", 214, "Edit", ES_RIGHT|ES_AUTOHSCROLL|WS_BORDER|WS_TABSTOP, 99, 163, 50, 12
CONTROL "Totale IVA:", 508, "Static", SS_RIGHT|WS_GROUP, 37, 183, 57, 8
CONTROL "Edit", 216, "Edit", ES_RIGHT|ES_AUTOHSCROLL|WS_BORDER|WS_TABSTOP, 99, 181, 50, 12
CONTROL "", 509, "Static", WS_GROUP, 157, 183, 26, 8
CONTROL "Totale fattura:", 510, "Static", SS_RIGHT|WS_GROUP, 37, 207, 57, 8
CONTROL "Edit", 218, "Edit", ES_RIGHT|ES_AUTOHSCROLL|WS_BORDER|WS_TABSTOP, 99, 205, 50, 12
CONTROL "Sconto:", 511, "Static", SS_RIGHT|WS_GROUP, 37, 225, 57, 8
CONTROL "Edit", 220, "Edit", ES_RIGHT|ES_AUTOHSCROLL|WS_BORDER|WS_TABSTOP, 99, 223, 50, 12
CONTROL "512", 512, "Button", BS_GROUPBOX, 17, 278, 175, 61
CONTROL "Data:", 513, "Static", SS_RIGHT|WS_GROUP, 37, 298, 43, 8
CONTROL "Edit", 222, "Edit", ES_AUTOHSCROLL|WS_BORDER|WS_TABSTOP, 86, 296, 90, 12
CONTROL "Importo:", 514, "Static", SS_RIGHT|WS_GROUP, 37, 316, 43, 8
CONTROL "Edit", 224, "Edit", ES_RIGHT|ES_AUTOHSCROLL|WS_BORDER|WS_TABSTOP, 86, 314, 90, 12
CONTROL "Salvare", 400, "Button", WS_TABSTOP, 277, 315, 50, 14
CONTROL "A carico del cliente:", 4002, "Static", SS_RIGHT|WS_GROUP, 23, 249, 71, 8
CONTROL "Edit", 221, "Edit", ES_RIGHT|ES_AUTOHSCROLL|WS_BORDER|WS_TABSTOP, 99, 247, 50, 12
CONTROL "515", 515, "Button", BS_GROUPBOX, 205, 100, 417, 108
CONTROL "Edit", 226, "Edit", ES_MULTILINE|ES_AUTOHSCROLL|ES_AUTOVSCROLL|ES_READONLY|WS_VSCROLL|WS_BORDER|WS_TABSTOP, 214, 114, 173, 86
CONTROL "516", 516, "Button", BS_GROUPBOX, 205, 212, 191, 88
CONTROL "", 228, "ListBox", LBS_SORT|LBS_NOTIFY|WS_VSCROLL|WS_BORDER|WS_TABSTOP, 214, 220, 173, 78
CONTROL "RESET", 410, "Button", WS_TABSTOP, 277, 332, 50, 14 <-------------------------------//--------------------- // ----------------------------
CONTROL "Check-box", 4004, "Button", BS_AUTOCHECKBOX|WS_TABSTOP, 423, 121, 48, 10
}
ACTIVATE DIALOG ::oDlg CENTERED ON INIT ( ;
this:oDlg:setMenu( this:buildMenu() ), ;
this:inicializar( ), ;
this:limpiarGets(), ;
IIf(HB_ArgV( 1 ) == "desarrollo", this:obtns[2]:show(), this:obtns[2]:hide());
) ;
Return to FiveWin para Harbour/xHarbour
Users browsing this forum: Google [Bot] and 45 guests