DelphiFAQ Home Search:

Buttons with wrapped text - use a TBitBtn

 

comments1 comments. Current rating: 5 stars (1 votes). Leave comments and/ or rate it.

(Courtesy of Terry Russell)

Besides using a TButton with an embedded TLabel, you can simply use a TBitBtn to display wrapped text. This can be achieved by either of the following ways:


  • Select 'view form as text' (Alt-F12) and change the TBitBtn caption to
    Caption = 'wrapped'#10'here'#10'and there'
    then 'view as form' again

    Caution:
    a few mistypes and have strange consequences here: DO NOT change names or cutnpaste new objects, modify only those already created

  • In startup code (.FormCreate()) set caption to 'Hello' + #10 + 'World';

  • If you copy a LF(#10) to clipboard you can paste (shift-insert)
    it into the TBitBtn caption to get the multiline text at design time
    CR doesn't work for this nor does alt-013 or alt-010 :-(
    this at least allows captioning.

    Comments:

    2007-05-23, 12:39:12
    from Mexico  
    rating
    Thank you very much for this tip.

    Regards from Mexico.

     

     

    Email address (not necessary):

    Rate as
    Hide my email when showing my comment.
    Please notify me once a day about new comments on this topic.
    Please provide a valid email address if you select this option.
     
    It seems that you are
    from Washington, US .

    Info/ Feedback on this

    Show city and country
    Show country only
    Hide my location
    You can mark text as 'quoted' by putting [quote] .. [/quote] around it.
    Please type in the code:
    photo Add a picture:

    Please do not post inappropriate pictures. Inappropriate pictures include pictures of minors and nudity. The owner of this web site reserves the right to delete such material.