Say/Get detiene brincos del tabulador (Corregido)

Say/Get detiene brincos del tabulador (Corregido)

Postby RodolfoRBG » Thu Mar 24, 2011 4:48 am

Estimados amigos,

Intento manejar una ventana desde codigo con el siguiente codigo:
Code: Select all  Expand view

 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: Select all  Expand view

  @ 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.
Last edited by RodolfoRBG on Sat Mar 26, 2011 10:30 pm, edited 1 time in total.
RodolfoRBG
FWH 1307, xHarbour123 BCC582
rodolfoerbg@gmail.com
User avatar
RodolfoRBG
 
Posts: 257
Joined: Tue May 16, 2006 4:46 pm
Location: San Luis Potosi, SLP, Mexico

Re: Say/Get detiene brincos del tabulador

Postby FiveWiDi » Thu Mar 24, 2011 7:45 am

RodolfoRBG wrote:Estimados amigos,

Intento manejar una ventana desde codigo con el siguiente codigo:
Code: Select all  Expand view

 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: Select all  Expand view

  @ 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: Select all  Expand view
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 24.02 + Harbour 3.2.0dev (r2403071241), BCC 7.7 Windows 10
FiveWiDi
 
Posts: 1060
Joined: Mon Oct 10, 2005 2:38 pm

Re: Say/Get detiene brincos del tabulador

Postby RodolfoRBG » Thu Mar 24, 2011 5: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
User avatar
RodolfoRBG
 
Posts: 257
Joined: Tue May 16, 2006 4:46 pm
Location: San Luis Potosi, SLP, Mexico

Re: Say/Get detiene brincos del tabulador

Postby FiveWiDi » 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: Select all  Expand view
//----------------------------------------------------------------------------//

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 24.02 + Harbour 3.2.0dev (r2403071241), BCC 7.7 Windows 10
FiveWiDi
 
Posts: 1060
Joined: Mon Oct 10, 2005 2:38 pm

Re: Say/Get detiene brincos del tabulador

Postby horacio » 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
horacio
 
Posts: 1358
Joined: Wed Jun 21, 2006 12:39 am
Location: Capital Federal Argentina

Re: Say/Get detiene brincos del tabulador

Postby FiveWiDi » 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 24.02 + Harbour 3.2.0dev (r2403071241), BCC 7.7 Windows 10
FiveWiDi
 
Posts: 1060
Joined: Mon Oct 10, 2005 2:38 pm

Re: Say/Get detiene brincos del tabulador

Postby RodolfoRBG » Fri Mar 25, 2011 6: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
User avatar
RodolfoRBG
 
Posts: 257
Joined: Tue May 16, 2006 4:46 pm
Location: San Luis Potosi, SLP, Mexico


Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 54 guests