Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / December 2005

Tip: Looking for answers? Try searching our database.

multi-line button text

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Ian Lazarus - 29 Dec 2005 16:49 GMT
Hello,
I have button text which I would like to have displayed on several lines,
with the line break occuring in a specific place. How can this be done? The
C control charactes "\n\r" are simply displayed as normal text.
Thanks
AMercer - 29 Dec 2005 19:05 GMT
> I have button text which I would like to have displayed on several lines,
> with the line break occuring in a specific place. How can this be done?

You need a linefeed (character decimal 10) in the button text which is easy
enough in code.  If the ide is making life difficult for you, try button text
"xxx~yyy", and then in the load event, replace "~" with a linefeed.
Ian Lazarus - 29 Dec 2005 20:28 GMT
I'm using Microsoft Visual C++.NET.

Besides "xxx\nyyy", I tried octal, "xxx\012yyy" and hexadecimal,
"xxx\x0Ayyy", but nothing worked. I can't believe there isn't a simple way
to do this.
AMercer - 31 Dec 2005 16:17 GMT
> I can't believe there isn't a simple way to do this.

There is a simple way - do it in the load event of your form, thereby
overcoming the shortcoming in the IDE.  I know it isn't elegant, but my
experience is that such things are necessary in nontrivial forms and controls.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.