problema con xbrowse y Grid (SOLUCIONADO)

Post Reply
User avatar
fgondi
Posts: 694
Joined: Fri Oct 07, 2005 6:58 am
Location: Palencia, España
Contact:

problema con xbrowse y Grid (SOLUCIONADO)

Post 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

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
 
Last edited by fgondi on Sat Sep 03, 2022 8:28 am, edited 1 time in total.
Un saludo
Fernando González Diez
ALSIS Sistemas Informáticos
User avatar
Antonio Linares
Site Admin
Posts: 42511
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 31 times
Been thanked: 73 times
Contact:

Re: problema con xbrowse y Grid.

Post by Antonio Linares »

Fernando,

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

gracias por reportarlo
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
richard-service
Posts: 807
Joined: Tue Oct 16, 2007 8:57 am
Location: New Taipei City, Taiwan
Has thanked: 1 time
Contact:

Re: problema con xbrowse y Grid.

Post 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
Best Regards,

Richard

Harbour 3.2.0dev (r2402101027) => Borland C++ v7.7 32bit
MySQL v8.0 /ADS v10
Harbour 3.2.0dev (r2011030937) => Borland C++ v7.4 64bit
User avatar
nageswaragunupudi
Posts: 10721
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Been thanked: 8 times
Contact:

Re: problema con xbrowse y Grid.

Post by nageswaragunupudi »

Please add one more setting:

Code: Select all | Expand

oBrw:lFullPaint := .t.
Regards

G. N. Rao.
Hyderabad, India
User avatar
fgondi
Posts: 694
Joined: Fri Oct 07, 2005 6:58 am
Location: Palencia, España
Contact:

Re: problema con xbrowse y Grid.

Post 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.
Un saludo
Fernando González Diez
ALSIS Sistemas Informáticos
User avatar
Antonio Linares
Site Admin
Posts: 42511
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 31 times
Been thanked: 73 times
Contact:

Re: problema con xbrowse y Grid.

Post 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
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
richard-service
Posts: 807
Joined: Tue Oct 16, 2007 8:57 am
Location: New Taipei City, Taiwan
Has thanked: 1 time
Contact:

Re: problema con xbrowse y Grid.

Post 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.
Best Regards,

Richard

Harbour 3.2.0dev (r2402101027) => Borland C++ v7.7 32bit
MySQL v8.0 /ADS v10
Harbour 3.2.0dev (r2011030937) => Borland C++ v7.4 64bit
User avatar
fgondi
Posts: 694
Joined: Fri Oct 07, 2005 6:58 am
Location: Palencia, España
Contact:

Re: problema con xbrowse y Grid.

Post by fgondi »

Ok.

Encantado de poder esperar.
Un saludo
Fernando González Diez
ALSIS Sistemas Informáticos
User avatar
nageswaragunupudi
Posts: 10721
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Been thanked: 8 times
Contact:

Re: problema con xbrowse y Grid.

Post 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

  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

  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.
Regards

G. N. Rao.
Hyderabad, India
User avatar
fgondi
Posts: 694
Joined: Fri Oct 07, 2005 6:58 am
Location: Palencia, España
Contact:

Re: problema con xbrowse y Grid.

Post by fgondi »

Perfect.
It works perfectly.

Thank you very much
Un saludo
Fernando González Diez
ALSIS Sistemas Informáticos
User avatar
nageswaragunupudi
Posts: 10721
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Been thanked: 8 times
Contact:

Re: problema con xbrowse y Grid.

Post by nageswaragunupudi »

fgondi wrote:Perfect.
It works perfectly.

Thank you very much


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

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
Posts: 10721
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Been thanked: 8 times
Contact:

Re: problema con xbrowse y Grid.

Post 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.
Regards

G. N. Rao.
Hyderabad, India
User avatar
fgondi
Posts: 694
Joined: Fri Oct 07, 2005 6:58 am
Location: Palencia, España
Contact:

Re: problema con xbrowse y Grid (SOLUCIONADO)

Post by fgondi »

Yes, I removed "oBrw:lFullPaint := .t."
Un saludo
Fernando González Diez
ALSIS Sistemas Informáticos
User avatar
richard-service
Posts: 807
Joined: Tue Oct 16, 2007 8:57 am
Location: New Taipei City, Taiwan
Has thanked: 1 time
Contact:

Re: problema con xbrowse y Grid.

Post 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

  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

  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.
Best Regards,

Richard

Harbour 3.2.0dev (r2402101027) => Borland C++ v7.7 32bit
MySQL v8.0 /ADS v10
Harbour 3.2.0dev (r2011030937) => Borland C++ v7.4 64bit
Post Reply