Page 1 of 1
Una sobre BRUSH
![Post Post](./styles/prosilver/imageset/icon_post_target.gif)
Posted:
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
![Post Post](./styles/prosilver/imageset/icon_post_target.gif)
Posted:
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
![Post Post](./styles/prosilver/imageset/icon_post_target.gif)
Posted:
Sun Jan 06, 2008 5:57 am
by mmercado
Hola Lorenzo:
Prueba con:
oBtn:oPBrush := oBrushF
oBtn:Refresh()
Saludos.
Manuel Mercado
![Post Post](./styles/prosilver/imageset/icon_post_target.gif)
Posted:
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](http://img201.imageshack.us/img201/5752/spiaggianotrasyh7.jpg)
@ 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]
![Post Post](./styles/prosilver/imageset/icon_post_target.gif)
Posted:
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
![Post Post](./styles/prosilver/imageset/icon_post_target.gif)
Posted:
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
![Post Post](./styles/prosilver/imageset/icon_post_target.gif)
Posted:
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
![Post Post](./styles/prosilver/imageset/icon_post_target.gif)
Posted:
Fri Jan 18, 2008 6:20 pm
by mmercado
Hi Silvio:
Try this:
oBtn:lTransparent := .T.
oBtn:nBorder := 0
Regards.
Manuel Mercado[/code]
![Post Post](./styles/prosilver/imageset/icon_post_target.gif)
Posted:
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