Es posible desactivar el Boton de un Btnget ? y activarlo solo cuando el get le introduzcan datos ??
Gracias
STATIC lCondicion := .F.
fFUNCTION MY FUNCTION()
REDEFINE BTNGET aGet[2] VAR XDIA PICTURE "@K!" ID 21 ;
OF oDlgFecha FONT oFont UPDATE WHEN( lCondicion ) ;
COLOR nRGB( 000, 000, 000 ), nRGB( 243, 250, 200 )
RETURN NIL
EN UN VALID... o ON CHANGE
FUNCTION CONDICION( aGet )
IF CONDICION
lCondicion := .T.
aGet[2]:Enable()
aGet[2]:Refresh()
ELSE
lCondicion := .F.
aGet[2]:Disable()
aGet[2]:Refresh()
ENDIF
RETUN( .T. )
TBtnGet():lFocusClr := .T.
oGet3:SeFocus()
oGet3:Refresh()
#include "FiveWin.ch"
FUNCTION MENU()
LOCAL oDlg1, oLbx1, oGet2, oGet3
SET 3DLOOK ON // Microsoft 3D Look
DEFINE DIALOG oDlg5 FROM 13, 15 TO 38, 76 ;
TITLE "Control de Tickets " ;
nTicket := 0
Libre := .T.
@ 0.25, 19.5 TBTNGET oGet2 VAR nTicket OF oDlg1 ;
SIZE 50, 12 ;
RESOURCE "Prop" ;
PICTURE "9999999";
ACTION Cliente1( oLbx, oGet2, oGet3 ); //F2 // oDlg1 ????
VALID ( Cliente11( @nTicket,oGet2,oGet3,oDlg1 ), Libre ) FONT fntArial
@ 2.55, 4 GET oGet3 VAR nImporte SIZE 45, 11 OF oDlg1 PICTURE "999,999.99" COLOR CLR_BLUE FONT fntArial RIGHT
// MUESTRE LOS BUTTONS porfa.
ACTIVATE Dialog oDlg5
RETURN NIL
FUNCTION Cliente11( oLbx, oGet2, oGet3 )
LOCAL oDlg5, oLbx1, oBtn51, oBtn52
SET 3DLOOK ON // Microsoft 3D Look
// CAMBIE AQUI.
SELECT 4
USE C:\Ventas\Ventas19 ALIAS aSls SHARED
GO TOP
DEFINE DIALOG oDlg5 FROM 13, 15 TO 38, 76 ;
TITLE "Control de Tickets Sesion: " + Alltrim( Str( xSesion ) ) ;
oDlg5:lHelpIcon := .F.
@ .2 , .2 LISTBOX oLbx1 FIELDS Transform( aSls->Ticket, "999999" ), Transform( aSls->Importe, "99999.99" ) ;
HEADERS "Ticket ", "Importe";
FIELDSIZES 80, 80;
SIZE 110, 65 OF oDlg5;
ON DBLCLICK Captura( oLbx1, oDlg5, oGet2, oGet3 ) FONT fntArial2
TWBrowse():lHScroll := .F. // HERNAN??
// MUESTRE LOS BUTTONS porfa.
ACTIVATE Dialog oDlg5
RETURN NIL
//****************************************************************************************
FUNCTION Captura( oLbx1, oDlg5, oGet2, oGet3 )
nTicket := aSls->Ticket
nImporte := aSls->Importe
oGet2:Refresh()
oGet3:SetFocus()
oGet3:Refresh()
oDlg5:End()
//*****AQUI NECESITO QUE AL CERRAR EL DIALOGO SE SALGA DEL oGet2, osea del BtnGet y el Foco Quede en oGet3
RETURN Nil
Return to FiveWin para Harbour/xHarbour
Users browsing this forum: No registered users and 39 guests