Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Downloads
Search: 

FlatButton Class
Selim Mejia, Lamanite Solutions
Use FlattButtons in your apps. It is flat command button with a Transparent background and a very usefull builder. Similiar to one that it is in this site, but this one doesn't depend of any other class and this one can get the focus. try it you will like it. I made it because I need a command button that can get transparent background.
Created on
21 years ago
Downloads
907
File type
General information
Description
It is amazing, I made it works in VFP6 and it workss in VFP5 but you wont see the Disabled effect. This is I think my first Visual class and I am really proud of it, even though some of you guys would think that is pretty simple. You will find with this file several files included : *:the class CoolControlsVFP6.vcx CoolControlsVFP6.vct *:the builder FlatButtonBld.app *:a little test Test.scx In order to use the builder you will have to register it first, to do so, just copy the FlatButtonBld.app into the wizards folder in the Home directory of VFP and run it, that should be enought. After that you will be able to use the builder *:the class The class has some properties to set the main values of it such *:Properties caption sets the button caption in the init event of the control tooltiptext sets the button tooltiptext in the init event of the control FontBold Logical parameter that indicates if the caption turns bold when mouse is over lGotFocus Logical property to let the control know that it has the focus MouseOver Logical parameter to know if the mouse is still over eventhough the control doesn't have the focus *Methods Down Fired by the mousedown and by the Enter and Spacebar when the control has the focus Up Fired by the mouseup and by the Enter and Spacebar when the control has the focus Enabled_assign Turns the control enabled or disabled depending on the value assigned OnMouseOut This method is fired when the mouse leaves the control, since this method doesn't exist in VFP6 I used a timer and the Sys(1270) to find out, don't worry about the timer, it is turned disabled when the mouse is out, so There won't be a performance problem. Since must of the programers wants to see how the control will look at runtime a think the best way to set the properties of the control is by using the builder. This class used to work with the brandnew event called MouseLeave in VFP7, but a friend challanged me to make it works for VFP6 since in VFP7 there is an special effect for the command buttons named Hot Tracking that is similar to what this class does so I changed it and made it works for the earlier versions, I made this class because I always use a background Picture for the forms, you know, is just my programming style. The regular command button of the VFP doesn't have a way to turn the background transparent, so I couldn't use my form background toghether with the regular command button. ****************** * Known Bugs * ****************** 1. VFP5 when you turn the control disabled you won't see the effect because the control uses the enabled_assign method which doesn't exist in this version, I don't know if you can call this a bug though. 2. Don't try to rename the control in the class browser to FlatButton becuase for some reason VFP6 doesn't allow to use the control in the forms with this name, doesn't even allow to save the form. Works fine when you save the form in VFP7 and then run it in VFP6. 3. Whe you use use the builder and select the bmp named Salir.bmp as image it seems to work fine but when you run the form the images disapears. For some reason it only happen with this image and only if you use the builder. If by anychance it came to past that somebody uses this class in some app, please feel free to modify it, update it, or send your comments to me to : mejiaks@tutopia.com or feel free to post a question, comment or complain addressed to Karben Selim Mejia in www.foxite.com forum as well I don't think this will have any upgrade because I think I cover all the things it should perform, but if you guys have any other idea, or upgrade please feel free to do it or comment it as i said. Hope somebody uses it and likes it Karben Selim Mejia Honduras, Central America
Created by
Selim Mejia, Lamanite Solutions

Comments
It doesn't work with VFP9. Metin Emre, March 31, 2010

Add a comment
More downloads created from this member
Selim Mejia, Lamanite Solutions
This is a control that simulate the fancy combobox of MS office for font selection. I made this to work specially with the Richtext control. Hope you all like it. The class have just one method and one property. the method is to retrieve the font family and the property is called limitofrecentlist t...
Created on
21 years ago
Downloads
622
File type
Rating
5.00/5.00