problema con xbrowse y Grid (SOLUCIONADO)

problema con xbrowse y Grid (SOLUCIONADO)

Postby fgondi » Tue Aug 30, 2022 10:21 am

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
 
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
fgondi
 
Posts: 694
Joined: Fri Oct 07, 2005 6:58 am
Location: Palencia, España

Re: problema con xbrowse y Grid.

Postby Antonio Linares » Tue Aug 30, 2022 10:27 am

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
Antonio Linares
Site Admin
 
Posts: 41315
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: problema con xbrowse y Grid.

Postby richard-service » Tue Aug 30, 2022 11:28 am

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 v5.7 /ADS v10
Harbour 3.2.0dev (r2011030937) => Borland C++ v7.4 64bit
User avatar
richard-service
 
Posts: 765
Joined: Tue Oct 16, 2007 8:57 am
Location: New Taipei City, Taiwan

Re: problema con xbrowse y Grid.

Postby nageswaragunupudi » Tue Aug 30, 2022 2:14 pm

Please add one more setting:
Code: Select all  Expand view
oBrw:lFullPaint := .t.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10248
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: problema con xbrowse y Grid.

Postby fgondi » Wed Aug 31, 2022 8:09 am

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
fgondi
 
Posts: 694
Joined: Fri Oct 07, 2005 6:58 am
Location: Palencia, España

Re: problema con xbrowse y Grid.

Postby Antonio Linares » Wed Aug 31, 2022 3:06 pm

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
Antonio Linares
Site Admin
 
Posts: 41315
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: problema con xbrowse y Grid.

Postby richard-service » Wed Aug 31, 2022 4:53 pm

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 v5.7 /ADS v10
Harbour 3.2.0dev (r2011030937) => Borland C++ v7.4 64bit
User avatar
richard-service
 
Posts: 765
Joined: Tue Oct 16, 2007 8:57 am
Location: New Taipei City, Taiwan

Re: problema con xbrowse y Grid.

Postby fgondi » Wed Aug 31, 2022 8:32 pm

Ok.

Encantado de poder esperar.
Un saludo
Fernando González Diez
ALSIS Sistemas Informáticos
User avatar
fgondi
 
Posts: 694
Joined: Fri Oct 07, 2005 6:58 am
Location: Palencia, España

Re: problema con xbrowse y Grid.

Postby nageswaragunupudi » Fri Sep 02, 2022 12:24 pm

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

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10248
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: problema con xbrowse y Grid.

Postby fgondi » Sat Sep 03, 2022 8:28 am

Perfect.
It works perfectly.

Thank you very much
Un saludo
Fernando González Diez
ALSIS Sistemas Informáticos
User avatar
fgondi
 
Posts: 694
Joined: Fri Oct 07, 2005 6:58 am
Location: Palencia, España

Re: problema con xbrowse y Grid.

Postby nageswaragunupudi » Sat Sep 03, 2022 8:43 am

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: 10248
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: problema con xbrowse y Grid.

Postby nageswaragunupudi » Sat Sep 03, 2022 8:45 am

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
nageswaragunupudi
 
Posts: 10248
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: problema con xbrowse y Grid (SOLUCIONADO)

Postby fgondi » Sat Sep 03, 2022 10:01 am

Yes, I removed "oBrw:lFullPaint := .t."
Un saludo
Fernando González Diez
ALSIS Sistemas Informáticos
User avatar
fgondi
 
Posts: 694
Joined: Fri Oct 07, 2005 6:58 am
Location: Palencia, España

Re: problema con xbrowse y Grid.

Postby richard-service » Sun Sep 04, 2022 3:48 am

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

Richard

Harbour 3.2.0dev (r2402101027) => Borland C++ v7.7 32bit
MySQL v5.7 /ADS v10
Harbour 3.2.0dev (r2011030937) => Borland C++ v7.4 64bit
User avatar
richard-service
 
Posts: 765
Joined: Tue Oct 16, 2007 8:57 am
Location: New Taipei City, Taiwan


Return to FiveWin para Harbour/xHarbour

Who is online

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