Page 1 of 1

Una sobre BRUSH

PostPosted: Thu Jan 03, 2008 3:58 pm
by Loren
Estimados compañeros:

¿ alguien sabe como cambiar el brush de un SButton ? Puedo cambiar el prompt pero no el Brush.

Yo hago así:
...
define brush oBrushF file 'Rojo.bmp'
Define dialog...
REDEFINE SBUTTON oBtn ID 4005 OF oDialog brush obrushF
....
Activate dialog

Y ahora hago:
1) Defino el nuevo brush:
define brush oBrushF file 'verde.bmp'
2) Cambio de brush
oBtn:SetBrush( oBrushF )
oBtn:refresh()
Incluso he intentado cambiar así:
oBtn:SetBrush( TBrush():New('verde.bmp') )

No genera ERROR, pero tampoco cambia el BRUSH
¿ Alguna sugerencia ? Me estoy volviendo loco!!
LORENZO

PostPosted: Fri Jan 04, 2008 3:35 pm
by Loren
Estimados compañeros:

He averiguado que se trata de "bug" en el codigo de TSBUTTON. No hay manera de cambiar el brush en tiempo de ejecución.

De todas formas, mil gracias.
LORENZO

PostPosted: Sun Jan 06, 2008 5:57 am
by mmercado
Hola Lorenzo:

Prueba con:

oBtn:oPBrush := oBrushF
oBtn:Refresh()

Saludos.

Manuel Mercado

PostPosted: Mon Jan 07, 2008 1:41 am
by Silvio
Manuel,
Do you saw my picture on this forum ?
the tsbutton are not trasparent
can you correct it pls ?
look it
Image
@ Fila,(Col+nPassLarg) SBUTTON aBtn[n];
File OMBEMPTY,;
OMBFULL,;
OMBEMPTY,;
OMBEMPTY PIXEL ;
OF oWChld ;
FONT oFont2 ;
CAPTION cCaption ;
TEXT ON_CENTER ;
tooltip cCaption2;
NOBOXTR
[code][/code]

PostPosted: Mon Jan 07, 2008 10:12 pm
by Loren
Estimado Maestro Manuel:

No cabe duda que su contribución a este mundo ha sido, es y será fundamental. Despues de muchos dias de prueba, ensayos, revisión del codigo fuente, conversaciones con compañeros del foro y mediante email privados e incluso con el maestro Antonio Linares, desistí y llegué a la conclusión que era un "bug" en la clase.

Sin embargo, para mi mayor sorpresa he seguido sus indicaciones y "et voilà", el brush se refresca perfectamente sin problemas.

Mil gracias de nuevo, maestro.
Lorenzo

PostPosted: Fri Jan 18, 2008 1:43 am
by mmercado
Hi Silvio:

I'm trying to update TSButton and TSBrowse and make them to work properly with Harbour/xHarbour. I saw your message but I'm not ready to answer your question yet. I'll be in touch.

Best regards.

Manuel Mercado

PostPosted: Fri Jan 18, 2008 10:04 am
by Silvio
Dear Manuel,
if you see the image up this message where you see umbrellas you can see the picture are not trasparent

PostPosted: Fri Jan 18, 2008 6:20 pm
by mmercado
Hi Silvio:

Try this:

oBtn:lTransparent := .T.
oBtn:nBorder := 0

Regards.

Manuel Mercado[/code]

PostPosted: Sat Jul 26, 2008 5:40 pm
by Silvio
Manuel ,
not run ok
I use tsbutton 6.1


Code: Select all  Expand view
    @ Fila,(Col+nPassLarg) SBUTTON  aBtn[n];
                                    File OMBFULL,;
                                          OMBEMPTY,;
                                          OMBFULL,;
                                          OMBFULL  PIXEL ;
                                    OF oWChld ;
                                     FONT oFont2 ;
                                     CAPTION cCaption ;
                                     TEXT ON_CENTER ;
                                     tooltip  cCaption2;
                                     NOBOX


                                      ELSE


                @ Fila,(Col+nPassLarg) SBUTTON  aBtn[n];
                                    File OMBEMPTY,;
                                          OMBFULL,;
                                          OMBEMPTY,;
                                          OMBEMPTY  PIXEL ;
                                    OF oWChld ;
                                     FONT oFont2 ;
                                     CAPTION cCaption ;
                                     TEXT ON_CENTER ;
                                     tooltip  cCaption2  ;
                                   NOBOX

                               ENDIF


                               aBtn[n]:lTransparent := .T.
                               aBtn[n]:nBorder := 0





I send you my picture