Board index » delphi » TButton Caption Alignment

TButton Caption Alignment

Hello,
  there's a way to change th alignment on a button caption?

Thanks
Marco Cotroneo

 

Re:TButton Caption Alignment


Marco,

standard TButton doesn't aloow to do it but Windows button can do. Just
create own component which is inhereted from TButton and in the CreateParams
method to add desired alignment to Style.

There you can customize vertical layout too. You can download my freeware
TSMButton where this is implemented. Also there you can use multilined
caption...
--
With best regards, Mike Shkolnik
E-Mail: mshkol...@scalabium.com
WEB: http://www.scalabium.com

Marco Cotroneo <m.cotro...@ritoll.it> D???
???Y??:3cbd6e0d$1_1@dnews...

Quote
> Hello,
>   there's a way to change th alignment on a button caption?

> Thanks
> Marco Cotroneo

Re:TButton Caption Alignment


Thanks Mike,
    but I meant to do it runt time without having to built a new
component...
anyone have any idea?

thanks
Marco

"Mike Shkolnik" <mshkol...@yahoo.com> ha scritto nel messaggio
news:3cbd72dc_1@dnews...

Quote
> Marco,

> standard TButton doesn't aloow to do it but Windows button can do. Just
> create own component which is inhereted from TButton and in the
CreateParams
> method to add desired alignment to Style.

> There you can customize vertical layout too. You can download my freeware
> TSMButton where this is implemented. Also there you can use multilined
> caption...
> --
> With best regards, Mike Shkolnik
> E-Mail: mshkol...@scalabium.com
> WEB: http://www.scalabium.com

> Marco Cotroneo <m.cotro...@ritoll.it> D???
> ???Y??:3cbd6e0d$1_1@dnews...
> > Hello,
> >   there's a way to change th alignment on a button caption?

> > Thanks
> > Marco Cotroneo

Re:TButton Caption Alignment


Quote
> "Mike Shkolnik" <mshkol...@yahoo.com> ha scritto nel messaggio
> news:3cbd72dc_1@dnews...
>> Just
>> create own component which is inhereted from TButton and in the
>> CreateParams method to add desired alignment to Style.

In article <3cbd7938_2@dnews>, "Marco Cotroneo" <m.cotro...@ritoll.it>
wrote:

Quote
> Thanks Mike,
>     but I meant to do it runt time without having to built a new
> component...
> anyone have any idea?

OK then.
Just
declare own class which is inhereted from TButton and in the
CreateParams method to add desired alignment to Style.

Then instantiate your class with something like
Button1:=TmyAlignedbutton.Create;
 {now set button properties here}

Other Threads