Create a Multiline Button Component
By Bob Swart, Delphi Pro

A regular TButton has its label neatly aligned in the middle of the button, which is fine for a short caption. But what if you need to put a long instruction or description on a button? A regular TButton cannot display more than one line of text. This 10-Minute Solution gives you three methods for modifying the button style to accommodate multiple lines.





I need to put a long line like an instruction or description on a button, but it's too long to display in a single line. How do I put more than one line of text on a button with Delphi?



You can either work in your Form to change the button style into a multiline one or write a custom TMultiLineButton component that implements this feature from the start.

  
Next: Make a Multiline Button by Hand


Introduction The Customized Query Technique
Make a Multiline Button by Hand Add the MultiLine Property to the TMultiLineButton


Return to Get Help with Delphi Page

Return to Main Get Help Page
 


Find Out More
• Get the source code for this Solution!

• The DevX Database Development Zone

Adding Additonal Functionality to TButton (from Delphi Central)

• More information about writing custom Delphi components on Dr. Bob's Web site


TALK BACK
Do you think multiline buttons are a good thing, or should user interfaces be kept clean? Do you want a multiline button for Kylix (on Linux) as well? Let us know in the Database Development discussion groups!
 





Sponsored Links