FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour Say/Get detiene brincos del tabulador (Corregido)
Posts: 257
Joined: Tue May 16, 2006 04:46 PM
Say/Get detiene brincos del tabulador (Corregido)
Posted: Thu Mar 24, 2011 04:48 AM
Estimados amigos,

Intento manejar una ventana desde codigo con el siguiente codigo:
Code (fw): Select all Collapse
 DEFINE WINDOW oWnd MDICHILD OF M->oWndPrin TITLE "Calendario" FROM 0, 0 TO 300,CooWP[4] PIXEL HELPID "Calendario"
  @ 180,005 GET oFInic VAR Finic OF oWnd SIZE 80,20 PIXEL UPDATE
  @ 180,095 COMBOBOX Operac ITEMS MasMen OF oWnd SIZE 40,50 PIXEL UPDATE
  @ 180,145 GET oNDias VAR NDias OF oWnd SIZE 30,20 PIXEL PICTURE "###" UPDATE //<-En este GET se detiene
  @ 180,185 SAY "Dias = " OF oWnd PIXEL //<-Esta instruccion hace que se detenga
  @ 180,245 GET oFFinal VAR FFinal OF oWnd SIZE 80,20 PIXEL UPDATE //<-Con el tabulador, no llega hasta este GET
 ACTIVATE WINDOW oWnd


pero si uso el tabulador se detiene en el GET oNDias, solo si quito el SAY se puede brincar al ultimo GET (oFFinal)

Intente "engañar" a la ventana usando en lugar de SAY un GET guardando en la variable SayDias:="Dias = " y condicionandolo asi:
Code (fw): Select all Collapse
  @ 180,185 GET SayDias OF oWnd SIZE 30,20 PIXEL WHEN .F.


pero se sigue deteniendo en el GET anterior. Solo quitando el GET condicionado o el SAY logro que se pase al ultimo get. Como lo puedo solucionar?

Se les agradece de antemano sugerencias.
RodolfoRBG
FWH 1307, xHarbour123 BCC582
rodolfoerbg@gmail.com
Posts: 1445
Joined: Mon Oct 10, 2005 02:38 PM
Re: Say/Get detiene brincos del tabulador
Posted: Thu Mar 24, 2011 07:45 AM
RodolfoRBG wrote:Estimados amigos,

Intento manejar una ventana desde codigo con el siguiente codigo:
Code (fw): Select all Collapse
 DEFINE WINDOW oWnd MDICHILD OF M->oWndPrin TITLE "Calendario" FROM 0, 0 TO 300,CooWP[4] PIXEL HELPID "Calendario"
  @ 180,005 GET oFInic VAR Finic OF oWnd SIZE 80,20 PIXEL UPDATE
  @ 180,095 COMBOBOX Operac ITEMS MasMen OF oWnd SIZE 40,50 PIXEL UPDATE
  @ 180,145 GET oNDias VAR NDias OF oWnd SIZE 30,20 PIXEL PICTURE "###" UPDATE //<-En este GET se detiene
  @ 180,185 SAY "Dias = " OF oWnd PIXEL //<-Esta instruccion hace que se detenga
  @ 180,245 GET oFFinal VAR FFinal OF oWnd SIZE 80,20 PIXEL UPDATE //<-Con el tabulador, no llega hasta este GET
 ACTIVATE WINDOW oWnd


pero si uso el tabulador se detiene en el GET oNDias, solo si quito el SAY se puede brincar al ultimo GET (oFFinal)

Intente "engañar" a la ventana usando en lugar de SAY un GET guardando en la variable SayDias:="Dias = " y condicionandolo asi:
Code (fw): Select all Collapse
  @ 180,185 GET SayDias OF oWnd SIZE 30,20 PIXEL WHEN .F.


pero se sigue deteniendo en el GET anterior. Solo quitando el GET condicionado o el SAY logro que se pase al ultimo get. Como lo puedo solucionar?

Se les agradece de antemano sugerencias.


Hola,

Yo tuve (aún tengo) algún problema similar a lo que explicas; prueba substituir el método GoNextCtrl en Window.prg por el siguiente código:
Code (fw): Select all Collapse
METHOD GoNextCtrl( hCtrl ) CLASS TWindow

   local hCtlNext, nAt

   //if Upper( ::ClassName() ) != "TDIALOG"

    if Upper( ::ClassName() ) != "TDIALOG" .and. ;
       Upper( ::ClassName() ) != "TMDICHILD" .and. ;
       Upper( ::ClassName() ) != "TGROUP"    // C.Gelabert 13/03/2008


      nAt = AScan( ::aControls, { | o | o:hWnd == hCtrl } )
      if nAt != 0
         if nAt < Len( ::aControls )
            hCtlNext = ::aControls[ nAt + 1 ]:hWnd
         else
            hCtlNext = ::aControls[ 1 ]:hWnd
         endif
//         if lAnd( GetWindowLong( ::hWnd, GWL_STYLE ), WS_TABSTOP )  // 2010-09-19
         if lAnd( GetWindowLong( hCtlNext, GWL_STYLE ), WS_TABSTOP )
            SetFocus( hCtlNext )
         endif
         return nil
      endif
   endif

   hCtlNext := NextDlgTab( ::hWnd, hCtrl )
   ::hCtlFocus = hCtlNext

   if ! Empty( ::aControls ) .and. hCtrl == ::LastActiveCtrl():hWnd //ATail( ::aControls ):hWnd
      if ! Empty( ::oWnd ) .and. ;
         ( ( Upper( ::oWnd:ClassName() ) $ "TFOLDER;TPAGES;TFOLDEREX" ) )
         hCtlNext = NextDlgTab( ::oWnd:oWnd:hWnd, ::oWnd:hWnd )
         ::hCtlFocus = hCtrl
      endif
   endif

   if hCtlNext == hCtrl .and. Upper( GetClassName( hCtrl ) ) == "EDIT"
      hCtlNext = NextDlgTab( GetParent( ::hWnd ), hCtrl )
   endif

   if hCtlNext != hCtrl
      SetFocus( hCtlNext )
   endif

return nil

//----------------------------------------------------------------------------//


Si te funciona, te pasaré el código del método GoPrevCtrl, que tiene el mismo problema.

A ver si tienes suerte.

Un Saludo

Carlos G.



FiveWin 25.12 + Harbour 3.2.0dev (r2502110321), BCC 7.7 Windows 11 Home

Posts: 257
Joined: Tue May 16, 2006 04:46 PM
Re: Say/Get detiene brincos del tabulador
Posted: Thu Mar 24, 2011 05:14 PM

Don Carlos, funciono perfecto!!! Muchas horas perdidas por este detallito.

Afecta en algo esta modificacion o hay alguna razon por la que no se ha corregido esto?

Te agradecere publiques la otra parte, lo relacionado con GoPrevCtrl()

RodolfoRBG
FWH 1307, xHarbour123 BCC582
rodolfoerbg@gmail.com
Posts: 1445
Joined: Mon Oct 10, 2005 02:38 PM
Re: Say/Get detiene brincos del tabulador
Posted: Fri Mar 25, 2011 11:17 AM
RodolfoRBG wrote:Don Carlos, funciono perfecto!!! Muchas horas perdidas por este detallito.

Afecta en algo esta modificacion o hay alguna razon por la que no se ha corregido esto?

Te agradecere publiques la otra parte, lo relacionado con GoPrevCtrl()


Me alegro, aquí va:
Code (fw): Select all Collapse
//----------------------------------------------------------------------------//

METHOD GoPrevCtrl( hCtrl ) CLASS TWindow

   local hCtlPrev := NextDlgTab( ::hWnd, hCtrl, .t. )
   local n, cFoldName, nAt

   //if Upper( ::ClassName() ) != "TDIALOG"

   if Upper( ::ClassName() ) != "TDIALOG" .and. ;
     Upper( ::ClassName() ) != "TMDICHILD" .and. ;
     Upper( ::ClassName() ) != "TGROUP"    // C.Gelabert 13/03/2008

      nAt = AScan( ::aControls, { | o | o:hWnd == hCtrl } )
      if nAt != 0
         if nAt > 1
            hCtlPrev = ::aControls[ nAt - 1 ]:hWnd
         else
            hCtlPrev = ATail( ::aControls ):hWnd
         endif
         if lAnd( GetWindowLong( ::hWnd, GWL_STYLE ), WS_TABSTOP )
            SetFocus( hCtlPrev )
         endif
         return nil
      endif
   endif

   #ifdef __CLIPPER__
      cFoldName = "TFOLDER"
   #else
      cFoldName = "SYSTABCONTROL32"
   #endif

   ::hCtlFocus = hCtlPrev

   if ! Empty( ::aControls ) .and. hCtrl == ::FirstActiveCtrl():hWnd //::aControls[ 1 ]:hWnd
      if ! Empty( ::oWnd ) .and. ;
         ( ( Upper( ::oWnd:ClassName() ) $ "TFOLDER;TPAGES;TFOLDEREX" ) )
         hCtlPrev = NextDlgTab( ::oWnd:oWnd:hWnd, ::oWnd:hWnd, .t. )
         ::hCtlFocus = hCtrl
      endif
   endif

   If hCtlPrev != hCtrl
      If Upper( GetClassName( hCtlPrev ) ) == cFoldName .or. ;
         Upper( GetClassName( hCtlPrev ) ) == "TPAGES"
         n = AScan( ::aControls, { | o | o:hWnd == hCtlPrev } )
         if n > 0
            ::aControls[ n ]:aDialogs[ ::aControls[ n ]:nOption ]:LastActiveCtrl():SetFocus()
         endif
      else
         SetFocus( hCtlPrev )
      endif
   endif

return nil

//----------------------------------------------------------------------------//


Espero que Antonio nos lea; de hecho afecta sobre todo a las pantallas MDICHILD y no se si somos muchos los que las utilizamos.

Un Saludo

Carlos G.



FiveWin 25.12 + Harbour 3.2.0dev (r2502110321), BCC 7.7 Windows 11 Home

Posts: 1364
Joined: Wed Jun 21, 2006 12:39 AM
Re: Say/Get detiene brincos del tabulador
Posted: Fri Mar 25, 2011 11:39 AM

Esto me viene de perillas, siempre tuve que hacer malabares para usar la tecla de tabulación en ventanas MDICHILD. Muchisimas gracias por este Post.
Salu2

Posts: 1445
Joined: Mon Oct 10, 2005 02:38 PM
Re: Say/Get detiene brincos del tabulador
Posted: Fri Mar 25, 2011 12:07 PM
horacio wrote:Esto me viene de perillas, siempre tuve que hacer malabares para usar la tecla de tabulación en ventanas MDICHILD. Muchisimas gracias por este Post.
Salu2


Rodolfo y Horacio,

Enviarle un post a Antonio, que ahora ya somos al menos 3 los afectados

Yo ya lo hice hace tiempo, pero supongo que tenía otros asuntos de más impacto encima de la mesa.

Gracias.

Un Saludo

Carlos G.



FiveWin 25.12 + Harbour 3.2.0dev (r2502110321), BCC 7.7 Windows 11 Home

Posts: 257
Joined: Tue May 16, 2006 04:46 PM
Re: Say/Get detiene brincos del tabulador
Posted: Fri Mar 25, 2011 06:26 PM

En efecto, sobretodo porque YA ESTA CORREGIDO!!! solo debe incorporarlo en las nuevas versiones para no tener que modificarlo en cada actualizacion.

RodolfoRBG
FWH 1307, xHarbour123 BCC582
rodolfoerbg@gmail.com

Continue the discussion