TextButton Professional: Example #1

To view the applet tags used on this page, right click inside this frame and choose View Source

In this example, and all those that follow, the value for the URL parameter has been prefixed with a dollar sign so that the buttons may be clicked without linking anywhere.

The first example above is the simplest possible use of TextButton Professional: a piece of text that will fit easily onto a single line (at the chosen applet width) and thus needs no autowrapping, alignment or delimiter. Indeed, for a single line of text to be automatically centered both vertically and horizontally, the AutoWrap parameter must be switched off. The ButtonFocusColor parameter is missing, so the button itself will not change color when focussed. The Font parameter has been left out so that the default font will be used.

In the example above, the three text colors are the same, but the button color changes in response to mouse actions. (Of course, you can change both text and button colors for any stage if you need to.) Three separate text labels have been entered for the three button stages, and the ButtonBevel has been increased to 3 pixels. In addition, the FontOverStyle has been used to change the style of the font to bolditalic when the mouse enters.

The applet above uses three single lines of text. In order to adjust the alignment and margins for single lines, it's necessary to turn the AutoWrap parameter on. This being done, the Align parameter is set to right, the TopMargin parameter is given a value of 21 to vertically center each text label, and the RightMargin parameter is set to 0.