FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour First results, painting Metro-buttons
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
First results, painting Metro-buttons
Posted: Sat Apr 28, 2012 12:00 AM
Hello,

my first tests of painting Metro-buttons are working fine.
Many things I have done for the Logopainter can be used.
How it works :
1. a button is painted in realtime.
2. the Button-selections can be saved to a INI. On restart You can carry on with Your work from this point.
3. as soon You like Your design, it can be saved to a Project-DBF ( 1 Button = 1 Record )
4. from the DBF, all buttons are created together to be displayed on Screen.
Testing Color-combinations ( Backgrounds and Fonts ) and Image-combinations.

There is still a lot to do :-)



Best Regards
Uwe :-)
Since 1995 ( the first release of FW 1.9 )

i work with FW.

If you have any questions about special functions, maybe i can help.
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: First results of a Metro-button-painter
Posted: Sat Apr 28, 2012 05:59 AM

TMetroPanel class has an inbuilt designer and program generator.

Regards



G. N. Rao.

Hyderabad, India
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: First results of a Metro-button-painter
Posted: Sat Apr 28, 2012 08:50 AM
Mr. Rao,

thank You very much for the Info.
It saves much work with Button-paintings.
I noticed only on small problem :
BMP tiled works only on LARGE to 100 %.
Using SMALL, 50 % of the used BMP is missing.

Added 3D look.
The lightgreen Button shows the Problem.



LARGE :

DEFINE METROBUTTON oBtn OF oMetro ;
COLOR RGB( 15, 15, 15 ),RGB( 219, 239, 107 ) ;
CAPTION "Image Types" ;
ALIGN "TOPRIGHT" ;
BITMAP c_path + "\Bitmaps\explorer.bmp" ;
BMPALIGN "BOTTOMLEFT" ;
SIZE 50, 50 ;
BODYTEXT "Bmp, Jpg;Ico;Png, ....any" ;
TEXTALIGN "BOTTOMRIGHT" ;
BACKGROUND c_path + "\Bitmaps\3D_1.bmp" ;
LARGE


SMALL :

DEFINE METROBUTTON oBtn OF oMetro ;
COLOR RGB( 15, 15, 15 ),RGB( 255, 128, 0 ) ;
CAPTION "Scroll" ;
ALIGN "TOPCENTER" ;
BODYTEXT "Horizontally;by MouseWheel" ;
TEXTALIGN "BOTTOMCENTER" ;
BACKGROUND c_path + "\Bitmaps\3D_1.bmp"

Best Regards
Uwe :-)
Since 1995 ( the first release of FW 1.9 )

i work with FW.

If you have any questions about special functions, maybe i can help.
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: First results, painting Metro-buttons
Posted: Sat Apr 28, 2012 05:50 PM
Found the Image-adjust calculation
The lage button is 264 x 132 and small 132 x 132 Image is adjusted to Buttonwidth.
From the resized Image, 132 pixel are used for the Image-height from top, keeping proportions.
It means, showing a special image like borders the Image must have the buttonsize,
to keep the effect.

The Logopainter uses full adjust.
Metrobuttons are using a part of the image-height :



Best Regards
Uwe :-)
Since 1995 ( the first release of FW 1.9 )

i work with FW.

If you have any questions about special functions, maybe i can help.

Continue the discussion