Board index » delphi » Multiple text line on button

Multiple text line on button

I'm using a BitBtn and would like to split a line of text into two lines on
a button.  Is there any special character to do this, and if so, does
anyone know what it is?
 

Re:Multiple text line on button


You're going to need a customised solution to this. One thing you could do is
to make your own bitmap with more than one line of text.

Charles Johnson

Re:Multiple text line on button


Hi,
try this way :
 Button.Caption:= 'Line1'#13'Line2'
I tryed it with TLabel and it's worked.

Nice days

P.B.

CEHJohnson p1e:

Quote
> You're going to need a customised solution to this. One thing you could do is
> to make your own bitmap with more than one line of text.

> Charles Johnson

Re:Multiple text line on button


In article <35F82E10.C9BFF...@iol.cz>, "Petr Bartk" <petrbar...@iol.cz>
writes:

Quote
>Hi,
>try this way :
> Button.Caption:= 'Line1'#13'Line2'
>I tryed it with TLabel and it's worked.

>Nice days

>P.B.

>CEHJohnson p1e:

>> You're going to need a customised solution to this. One thing you could do
>is
>> to make your own bitmap with more than one line of text.

>> Charles Johnson

Wow! That's an old one. So you tried it with a label - now try it with a
button!

Charles Johnson

Re:Multiple text line on button


Override the CreateParams procedure of a TButton object as follows

  Type TMyButton = Class(TButton)
  public
    procedure CreateParams(var Params: TCreateParams);override;
  end;

procedure TMyButton.CreateParams(var Params: TCreateParams);
begin
  inherited;
  Params.style := Params.Style or  BS_MULTILINE;
end;

In article <19981024060219.01451.00000...@ngol01.aol.com>, CEHJohnson
<cehjohn...@aol.com> writes

Quote

>In article <35F82E10.C9BFF...@iol.cz>, "Petr Bartk" <petrbar...@iol.cz>
>writes:

>>Hi,
>>try this way :
>> Button.Caption:= 'Line1'#13'Line2'
>>I tryed it with TLabel and it's worked.

>>Nice days

>>P.B.

>>CEHJohnson p1e:

>>> You're going to need a customised solution to this. One thing you could do
>>is
>>> to make your own bitmap with more than one line of text.

>>> Charles Johnson

>Wow! That's an old one. So you tried it with a label - now try it with a
>button!

>Charles Johnson

Kind Regards - Claire
Software Engineer
email : c...@nospamHallworthHome.demon.co.uk
** Remove nospam from email address **

Other Threads