FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour Una sobre BRUSH
Posts: 479
Joined: Fri Feb 16, 2007 10:29 AM
Una sobre BRUSH
Posted: Thu Jan 03, 2008 03:58 PM

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

Posts: 479
Joined: Fri Feb 16, 2007 10:29 AM
Una sobre BRUSH
Posted: Fri Jan 04, 2008 03:35 PM

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

Posts: 782
Joined: Wed Dec 19, 2007 07:50 AM
Una sobre BRUSH
Posted: Sun Jan 06, 2008 05:57 AM

Hola Lorenzo:

Prueba con:

oBtn:oPBrush := oBrushF
oBtn:Refresh()

Saludos.

Manuel Mercado

manuelmercado at prodigy dot net dot mx
Posts: 3107
Joined: Fri Oct 07, 2005 06:28 PM
Una sobre BRUSH
Posted: Mon Jan 07, 2008 01:41 AM
Manuel,
Do you saw my picture on this forum ?
the tsbutton are not trasparent
can you correct it pls ?
look it

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



Falconi Silvio
Posts: 479
Joined: Fri Feb 16, 2007 10:29 AM
Una sobre BRUSH
Posted: Mon Jan 07, 2008 10:12 PM

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

Posts: 782
Joined: Wed Dec 19, 2007 07:50 AM
Una sobre BRUSH
Posted: Fri Jan 18, 2008 01:43 AM

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

manuelmercado at prodigy dot net dot mx
Posts: 3107
Joined: Fri Oct 07, 2005 06:28 PM
Una sobre BRUSH
Posted: Fri Jan 18, 2008 10:04 AM

Dear Manuel,
if you see the image up this message where you see umbrellas you can see the picture are not trasparent

Best Regards, Saludos



Falconi Silvio
Posts: 782
Joined: Wed Dec 19, 2007 07:50 AM
Una sobre BRUSH
Posted: Fri Jan 18, 2008 06:20 PM

Hi Silvio:

Try this:

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

Regards.

Manuel Mercado[/code]

manuelmercado at prodigy dot net dot mx
Posts: 3107
Joined: Fri Oct 07, 2005 06:28 PM
Una sobre BRUSH
Posted: Sat Jul 26, 2008 05:40 PM
Manuel ,
not run ok
I use tsbutton 6.1


    @ 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
Best Regards, Saludos



Falconi Silvio

Continue the discussion