Board index » delphi » Stupid question about TButton Caption property

Stupid question about TButton Caption property

Ok,
        I'm newbie, but learning quickly.  How can I get the caption on a
TButton to wrap to two lines?  Assuming I have made my button wide enough, I
want to have the caption say something like:

            +----------------------------+
             |                             |
             |         Press            |
             |  Enter to Continue   |
             |                              |
            +-----------------------------+

Gee, I hope the above line drawing comes out right....

Anway, I've tried:

Button1.Caption := 'Press' + #13 + 'Enter to Continue' ; but that doesnt work.
How do you do this?

Regards,
Mark

**  Remove ".nospam" when replying or email will bounce back to you...

 

Re:Stupid question about TButton Caption property


In article <01bcd920$6a0dc740$af804dd1@peanut>, "Laurie Bisman"

Quote
<lbis...@ihug.co.nz> wrote:

>Mark Cooperstein <coope...@mounet.com.nospam> wrote in article
><620u4q$86...@usenet76.supernews.com>...
>> Ok,
>>         I'm newbie, but learning quickly.  How can I get the caption on a

>> TButton to wrap to two lines?  Assuming I have made my button wide

I'd really recommend you get the RX Delphi library from        
http://rx.unionjv.ru

They have such a button plus LOTS AND LOTS AND LOTS AND LOTS AND
LOTS......................

of extra things. Oh, and its free too!..:))

Best of luck.

Naz.

Re:Stupid question about TButton Caption property


Mark Cooperstein <coope...@mounet.com.nospam> wrote in article
<620u4q$86...@usenet76.supernews.com>...

Quote
> Ok,
>         I'm newbie, but learning quickly.  How can I get the caption on a
> TButton to wrap to two lines?  Assuming I have made my button wide
enough, I
> want to have the caption say something like:

>             +----------------------------+
>              |                             |
>              |         Press            |
>              |  Enter to Continue   |
>              |                              |
>             +-----------------------------+

It isn't possible to do this with the existing buttons. You must either
create your own button component or grab a multi-line button from one of
the delphi sites (Delphi Super Site is probably the best) there are plenty
of these around. If you have a problem, yell and I'll email you a button
component.

Regards,

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Laurie Bisman    lbis...@ihug.co.nz (ICQ 1458799)
Web page          http://homepages.ihug.co.nz/~lbisman/index.html
Company           http://www.addlink.ac.nz/Home.htm
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Re:Stupid question about TButton Caption property


Quote
>         I'm newbie, but learning quickly.  How can I get the caption on a
> TButton to wrap to two lines?  Assuming I have made my button wide
enough, I
> want to have the caption say something like:
> Button1.Caption := 'Press' + #13 + 'Enter to Continue' ; but that doesnt
work.
> How do you do this?

Did you ever see a standard Windows button with a two-line caption? Windows
doesn't allow this. So you'll have to draw your text yourself and use a
BitBtn or soemthing like that...

Arsne von Wyss
avonwyss @ beaulieu-software.ch

******************************************************
*    I removed my reply address to avoid spamming.   *
* Please use the address above to reply or write me. *
******************************************************

Other Threads