How to customize the 3D rendering of custom shaped buttons |
|
3D Active Button Magic comes with several kinds of 3D rendering built in, but it is possible to use a more sophisticated 3D approach using bitmaps created with specific graphical applications like Adobe PhotoShop™ or others: the strength of this kind of approach is the fact that you will have the ability to control caption text at both design-time and run-time. Before proceeding with this tutorial, you may wish to review How to create a custom shaped button. Now, suppose you need to have a button that you wish to have the following 3D rendering in Normal state: (Picture #1) and the following 3D rendering when the mouse is over the button (or when the button is pressed): (Picture #2) Starting with Version 7 of the control, custom-shaped buttons can be created using color bitmaps, so you can use the first picture as a mask for creating the custom-shaped button. Note that when you create a mask, you must keep in mind that the color of the bitmap's left top pixel will be managed as transparent. So you must be sure that this color will not be present inside the part of bitmap that will be used to determine the button shape. Since the pure yellow color is not present in either of the above buttons, the yellow color can be applied to the bitmap portion that will be treated as transparent (this task can be easily performed using a simple graphical application like Microsoft Paint.) (Picture #3) Now we have all the elements needed to create our custom shaped button at Design-time and at Runtime. Design-time:
Runtime:
|