Friday, October 7, 2011

ssButton3 (new)

November 7 update:

ssButton2 & ssButton3

Originally, changing its Enabled status will not be visually reflected outright and it will take effect only once you move your mouse pointer on top of it via MouseEnter event. Fixed that now that when you issue Thisform.ssbutton3_1.Enabled = .F., it will be refelected immediately on all objects within the class like the caption and the button itself.  Same when you turn its Enabled property back to .T.


ssButton3 is the 3rd style of my command buttons sort of class.  ssButton is shared before in while  ssButton2 is shared somewhere inside Foxite forum.

For those who are new to ssButton classes, I designed it to replace the native commandbutton object of VFP.  ssButton3 is just like a normal button in almost every way now but with better GUI and hover effect.  If you have seen MS Office 2010 where a button changes from plain color to somewhat orange highlighting, then you can imagine how ssButton3 works.  It is just like that but with additional feature that it has more highlight colors to choose from (I made the default yellow) and you can choose between SpecialEffect of 3D or Hot Tracking (also known as Hover Effect by some).

Here is a sample image of that on one of my modules here.  Mouse pointer is over Search button and so the color has changed into yellow.  If you will take a closer look, ssbutton3 has a glow effect inside which makes the appearance better:

Its usage is very simple.  To set the appearance of the button, just double-click it and in its INIT event, place something like what is shown below.  Intellisense will aid you in knowing the proper settings and proper naming convention is used to guide users whether it is numeric, character, logical, etc.:

Right now, it has 6 possible hover color to choose from:

1 = red
2 = green
3 = yellow (default)
4 = orange (just like MS Office 2010)
5 = brown
6 = blue

One major improvement of this new class (as well as ssContainer2) over its ancestors is that the button is no longer a dull plain square.

ssContainer's curvature, I forgot to mention on its own blog, can be changed by the user.  I have added that now as well to ssButton3.  The hover effect on focus is running on default curvature while the ones above it I set to 40 just to show here how it will look like:

And for comparison, I will show ssButton2 & 3 side by side here:

For the current listing of ssClasses, click this link:

No comments:

Post a Comment