Page 1 of 1

New SkinButtons() in FWH 9.09

Posted: Tue Sep 08, 2009 10:02 am
by Antonio Linares
New function SkinButtons() to change the look of all your standard windows buttons, in your application, with just a function call:
Image
You can also set the colors that you want for normal, focus and pressed states, even at runtime!:

Code: Select all

   SetSkinButtonsColors( 1, { { 0.33, nRGB( 167,  73, 169 ), nRGB( 253, 157, 165 ) }, ;
                              { 0.33, nRGB( 253, 157, 165 ), nRGB( 167,  73, 169 ) } },;
                         nRGB( 153, 43, 153 ), nRGB( 213, 102, 213 ) )     
   
   SkinButtons()
 
Image

Re: New SkinButtons() in FWH 9.09

Posted: Tue Sep 08, 2009 3:12 pm
by lailton.webmaster
Congratulations antonio, very cool :D

You think that can make it to change color, border, style of a GET too ?

what´s you think about it ?

Thanks

Re: New SkinButtons() in FWH 9.09

Posted: Tue Sep 08, 2009 10:49 pm
by Antonio Linares
Image

Re: New SkinButtons() in FWH 9.09

Posted: Fri Sep 11, 2009 5:00 pm
by Antonio Linares
Skins support for Class TButtonBmp :-)

Image

Re: New SkinButtons() in FWH 9.09

Posted: Sat Sep 12, 2009 4:23 am
by dutch
Dear Antonio,

What is the difference between TButtonBmp() .and. TBtnBmp().
Will both support Accelerator Key?

Regards,
Dutch

Re: New SkinButtons() in FWH 9.09

Posted: Sat Sep 12, 2009 6:16 am
by Antonio Linares
Dutch,

Class TBtnBmp is a FWH defined Class. It is not a standard Windows API control class:
http://wiki.fivetechsoft.com/doku.php?i ... ss_tbtnbmp

Class TButtonBmp uses the Windows standard Button Class, and paints a bitmap on top of it:
http://wiki.fivetechsoft.com/doku.php?i ... tbuttonbmp

Both support accelerators.

Re: New SkinButtons() in FWH 9.09

Posted: Fri May 14, 2010 1:21 am
by fraxzi
Mr. Antonio,

using SkinButtons(), disabled text color can be defined.. How to set backgound color of disabled button?


Regards,
Frances

Re: New SkinButtons() in FWH 9.09

Posted: Fri May 14, 2010 12:11 pm
by Antonio Linares
Frances,

It is not supported in current version.

We have to modify the CLASS TSkinButton to support it.

Re: New SkinButtons() in FWH 9.09

Posted: Sat May 15, 2010 12:24 am
by fraxzi
Antonio Linares wrote:Frances,

It is not supported in current version.

We have to modify the CLASS TSkinButton to support it.

Mr. Antonio,

Where can I find the .prg to modify TSkinButton.. I'm using 10.4.
I search \source\*.prg folder but not found file containing TSkinButton or the function SkinButtons().


Regards,
Frances

Re: New SkinButtons() in FWH 9.09

Posted: Sat May 15, 2010 7:12 am
by Antonio Linares
Frances,

We have not published it yet, anyhow if you want to enhance it I send it to you by email :-)

Please send me back your proposed changes and we will publish them in next FWH 10.5, thanks

Re: New SkinButtons() in FWH 9.09

Posted: Sat May 15, 2010 7:52 pm
by Antonio Linares
Frances has kindly updated the Class TSkinButton to support background colors for disabled buttons :-)

Image

Next FWH 10.5 will include it

Re: New SkinButtons() in FWH 9.09

Posted: Sat May 15, 2010 10:33 pm
by miragerr
Ola amigos

Antonio es verificado que los TEXT del BUTTOMBMP ficam sempre centralizados não ficam a LEFT ou RIGHT

tem como corrigir isso

Fico no aguardo

Re: New SkinButtons() in FWH 9.09

Posted: Mon May 17, 2010 1:29 am
by fraxzi
Antonio Linares wrote:Frances has kindly updated the Class TSkinButton to support background colors for disabled buttons :-)

...

Next FWH 10.5 will include it

Dear Mr. Antonio,

Thank you for the appreciation.

Declaring the function Skinbuttons() will use the default gradient color for disabled button

Code: Select all

aClrDisabled :=  { { 1/2, nRGB( 255,255,255 ),RGB(167,166,170)  },;
                   { 1/2, RGB(167,166,170), nRGB( 255,255,255 ) } }
or user can redefine their own

Code: Select all

oSkinBtn := TSkinButton():New()

oSkinBtn:aClrDisabled := 'define your own gradient here'  :-)

SkinButtons( oSkinBtn )

not so much but it helps the visual with an obvious disabled button.


Best Regards,
Frances