Page 1 of 1

problema con xbrowse y Grid (SOLUCIONADO)

PostPosted: Tue Aug 30, 2022 10:21 am
by fgondi
Tengo un xbrowse con colores en degradado y al moverve con los cursores no limpia bien las celdas. (haciendo click con el ratón en otra fila sí actualiza las filas bien)

Se quedan restos por debajo de la celda del color amarillo y verde.
Image


He modificado el ejemplo /Samples/xbwser.prg
Code: Select all  Expand view
function fSetUp( oBrw, aHead )
  local nI

   for nI = 1 to len( aHead )
      oBrw:aCols[ nI ]:cHeader   = aHead[ nI ]
   next

   //oBrw:bClrStd := {|| {CLR_BLACK, iif( oBrw:nArrayAt() % 2 = 0, CLR_HCYAN, CLR_LIGHTGRAY  ) } }
   oBrw:bClrStd          := { || if( oBrw:nArrayAt() % 2 == 0, { CLR_BLACK, nRGB(186, 224, 191) }, { CLR_BLACK, nRGB(214, 237, 215)} ) }
   oBrw:bClrSelFocus     := { || { CLR_BLACK, { { .5, nRgb(128, 128, 0), nRGB(255,255,193) }, { .5, nRGB(255,255,193), nRgb(128, 128, 0) } }} }
   oBrw:bClrRowFocus     := { || { CLR_BLACK, { { .5, CLR_WHITE, nRgb(255, 217, 93) } } } }    
   
   oBrw:oWnd:aControls[ BUTTON_PRINT ]:cCaption := "My Text"
   oBrw:oWnd:aControls[ BUTTON_PRINT ]:bAction := {|| msginfo( "My Action" ) }

   oBrw:oWnd:aControls[ BUTTON_SHEET ]:cCaption := "Notepad"
   oBrw:oWnd:aControls[ BUTTON_SHEET ]:bAction := {|| winexec( "Notepad.exe") }

return nil
 

Re: problema con xbrowse y Grid.

PostPosted: Tue Aug 30, 2022 10:27 am
by Antonio Linares
Fernando,

El Sr. Rao lo va a revisar ya que él es el mantenedor de la Clase TXBrowse

gracias por reportarlo

Re: problema con xbrowse y Grid.

PostPosted: Tue Aug 30, 2022 11:28 am
by richard-service
Antonio Linares wrote:Fernando,

El Sr. Rao lo va a revisar ya que él es el mantenedor de la Clase TXBrowse

gracias por reportarlo


Dear Antonio,

Same as my problem. But no any answer for it.

http://forums.fivetechsupport.com/viewtopic.php?f=3&t=41983&sid=03f9d927ce2d8747bb610a38cb326610

Re: problema con xbrowse y Grid.

PostPosted: Tue Aug 30, 2022 2:14 pm
by nageswaragunupudi
Please add one more setting:
Code: Select all  Expand view
oBrw:lFullPaint := .t.

Re: problema con xbrowse y Grid.

PostPosted: Wed Aug 31, 2022 8:09 am
by fgondi
Hola,

con lFullPaint, se soluciona el problema del pintado.

Pero si el browse tiene muchas columnas en pantalla, se ralentiza mucho el movimiento con los cursores hacia arriba y hacia abajo.

Re: problema con xbrowse y Grid.

PostPosted: Wed Aug 31, 2022 3:06 pm
by Antonio Linares
Fernando,

El Sr. Rao me comentó ayer que esto es una solución temporal y que se pone manos a la obra para solucionarlo correctamente

Démosle tiempo para poder hacerlo :-)

un abrazo

Re: problema con xbrowse y Grid.

PostPosted: Wed Aug 31, 2022 4:53 pm
by richard-service
Antonio Linares wrote:Fernando,

El Sr. Rao me comentó ayer que esto es una solución temporal y que se pone manos a la obra para solucionarlo correctamente

Démosle tiempo para poder hacerlo :-)

un abrazo


Ok. Waiting for it.

Re: problema con xbrowse y Grid.

PostPosted: Wed Aug 31, 2022 8:32 pm
by fgondi
Ok.

Encantado de poder esperar.

Re: problema con xbrowse y Grid.

PostPosted: Fri Sep 02, 2022 12:24 pm
by nageswaragunupudi
Can you both please help me by testing this fix?

In the program
fwh\source\function\imgtxtio.prg,
function GradientFill(...)

Please locate these lines of code:
Code: Select all  Expand view
  if lVert
      nSize    := nBottom - nTop + 1

      for nClr := 1 to nClrs

         nSlice = If( nClr == nClrs, nBottom, ;
                     Min( nBottom, nTop + nSize * aGradInfo[ nClr ][ 1 ] - 1 ) )

         Gradient( hDC, { nTop, nLeft, nSlice, nRight },;
                   aGradInfo[ nClr ][ 2 ], aGradInfo[ nClr ][ 3 ], .T. )

         nTop = nSlice + 1

         if nTop > nBottom
            exit
         endif
      next

   else
 


Please replace the above block of code with this block:
Code: Select all  Expand view
  if lVert
      nSize    := nBottom - nTop //+ 1

      for nClr := 1 to nClrs

         nSlice = If( nClr == nClrs, nBottom, ;
                     Min( nBottom, nTop + nSize * aGradInfo[ nClr ][ 1 ] - 1 ) )

         Gradient( hDC, { nTop, nLeft, nSlice - 1, nRight },;
                   aGradInfo[ nClr ][ 2 ], aGradInfo[ nClr ][ 3 ], .T. )

         nTop = nSlice //+ 1

         if nTop > nBottom
            exit
         endif
      next

   else
 


Please test with this change and let us know if this change solves the problem.

Re: problema con xbrowse y Grid.

PostPosted: Sat Sep 03, 2022 8:28 am
by fgondi
Perfect.
It works perfectly.

Thank you very much

Re: problema con xbrowse y Grid.

PostPosted: Sat Sep 03, 2022 8:43 am
by nageswaragunupudi
fgondi wrote:Perfect.
It works perfectly.

Thank you very much


Did you remove "oBrw:lFullPaint := .t." and test?
Thanks for testing.

Re: problema con xbrowse y Grid.

PostPosted: Sat Sep 03, 2022 8:45 am
by nageswaragunupudi
richard-service wrote:
Antonio Linares wrote:Fernando,

El Sr. Rao me comentó ayer que esto es una solución temporal y que se pone manos a la obra para solucionarlo correctamente

Démosle tiempo para poder hacerlo :-)

un abrazo


Ok. Waiting for it.


Please test and confirm.

I need all your help because I have poor eye vision.
I can not accurately decide by myself.

Re: problema con xbrowse y Grid (SOLUCIONADO)

PostPosted: Sat Sep 03, 2022 10:01 am
by fgondi
Yes, I removed "oBrw:lFullPaint := .t."

Re: problema con xbrowse y Grid.

PostPosted: Sun Sep 04, 2022 3:48 am
by richard-service
nageswaragunupudi wrote:Can you both please help me by testing this fix?

In the program
fwh\source\function\imgtxtio.prg,
function GradientFill(...)

Please locate these lines of code:
Code: Select all  Expand view
  if lVert
      nSize    := nBottom - nTop + 1

      for nClr := 1 to nClrs

         nSlice = If( nClr == nClrs, nBottom, ;
                     Min( nBottom, nTop + nSize * aGradInfo[ nClr ][ 1 ] - 1 ) )

         Gradient( hDC, { nTop, nLeft, nSlice, nRight },;
                   aGradInfo[ nClr ][ 2 ], aGradInfo[ nClr ][ 3 ], .T. )

         nTop = nSlice + 1

         if nTop > nBottom
            exit
         endif
      next

   else
 


Please replace the above block of code with this block:
Code: Select all  Expand view
  if lVert
      nSize    := nBottom - nTop //+ 1

      for nClr := 1 to nClrs

         nSlice = If( nClr == nClrs, nBottom, ;
                     Min( nBottom, nTop + nSize * aGradInfo[ nClr ][ 1 ] - 1 ) )

         Gradient( hDC, { nTop, nLeft, nSlice - 1, nRight },;
                   aGradInfo[ nClr ][ 2 ], aGradInfo[ nClr ][ 3 ], .T. )

         nTop = nSlice //+ 1

         if nTop > nBottom
            exit
         endif
      next

   else
 


Please test with this change and let us know if this change solves the problem.


Dear Mr.Rao

not work.