Estimados Colegas
Les hago una consulta con respecto a tsbutton y cancel, Como puedo hacer cuando presiono el boton me salte el valid y me ejecute la funcion local, estoy trabajando con FW 2.4 Clipper y tsbutton 4 o 5 , les adjunto el codigo ahora cuando presiono el codigo me ejecuta busdeli del valid y luego local
desde ya muchisimas gracias
Dante
devwin2004@yahoo.com.ar
@ 1.2,05.8 GET otelefo VAR xtelefo OF oDlgd size 60,15 font oFontb Picture '9999999999' ;
Valid busdeli (xtelefo,Odlgd,otelefo,nkey,xturno,xadicion,TIEMPO)
@ 11.0,277 SBUTTON b2 of oDLgd Cancel FILENAME "NEW1.BMP" size 24,24 pixels TEXT ON_BOTTOM NOBOX COLOR CLR_NBLUE,CLR_6 action local(xtelefo,Odlgd,otelefo,olbx1)
@ 34, 275 SAY "Procesado" OF oDlgD SIZE 35,10 PIXEL ;
FONT oFontC COLOR CLR_BLACK,CLR_6
Consulta Tsbutton y Cancel nuevamente
- Joel Andujo
- Posts: 133
- Joined: Fri Oct 07, 2005 3:14 pm
- Location: Cd. Obregón, Sonora, México
- Contact:
Dante tienes que modificar el Método KillFocus de la clase tControl
agrega el string TSButton como en este ejemplo :
Saludos
Joel Andujo
agrega el string TSButton como en este ejemplo :
Saludos
Joel Andujo
Code: Select all | Expand
METHOD KillFocus( hCtlFocus ) CLASS TControl local oWnd if ! Empty( hCtlFocus ) .and. ::bValid != nil .and. WndParents( hCtlFocus, ::hWnd ) .and. ; ( oWnd := oWndFromhWnd( hCtlFocus ) ) != nil .and. ; Upper( oWnd:Classname() ) $ "TBUTTON;TBTNBMP;TSBUTTON" .and. ; ( oWnd:lCancel != nil .and. oWnd:lCancel .and. ; ( ::oWnd:nLastKey != VK_TAB .and. ::oWnd:nLastKey != VK_RETURN .and. ; ::oWnd:nLastKey != VK_DOWN .and. ::oWnd:nLastKey != VK_UP ) ) // JAAM Agregue ";TSBUTTON" para que le haga caso a ::oWnd:lValidating = .t. // la clusula CANCEL en los botones ::oWnd:nLastKey := 0 ::ForWhen() ::oWnd:lValidating = .f. ::LostFocus() return nil else if Upper( GetClassName( hCtlFocus ) ) == "TBTNBMP" ::oWnd:nLastKey := 0 // it fixes TBtnBmp CANCEL clause endif endif // in FiveWin++ lValidating comes as nil sometimes if ! Empty( hCtlFocus ) .and. ( ::oWnd:lValidating == nil .or. ! ::oWnd:lValidating ) ; .and. IsWindowVisible( ::oWnd:hWnd ) .and. WndParents( hCtlFocus, ::hWnd ) PostMessage( ::hWnd, FM_LOSTFOCUS, hCtlFocus ) endifreturn ::LostFocus( hCtlFocus )
-
- Posts: 42
- Joined: Mon Dec 05, 2005 1:27 am