|
Can anyone help? I'm new to C# and .net, and this is driving me crazy.
I am reading database values to set the text on buttons. Some strings need to wrap onto 2 lines. In ASP I seem to be able to enter in a code to force a new line, but this doesn't work when I try it in C#, either by splitting the string and inserting a code, or even putting it into the string in my database.
Does anyone know any way I can get the button text to wrap automatically as it seems to in windows forms? Or can anyone suggest a way of dealing with long text?
I would REALLY appreciate any help.
Cheers
Annabel
|
|
|
Annabel,
I am having the exact same problem. Have you found a solution yet?
Cheers,
Eric
Bell's Brewery, Inc.
|
|
|
No, I've tried lots of different things but had to give up and make the buttons bigger.
|
|
|
After you have presized your button to fit the text, set the text property in the page load event like this: Button2.Text = "Add To and View" + "\r\n" + "Wait List";
or whatever text you need. Granted, if you're grabbing your text dynamically, using this method you would have to create an algorithm to size the button as well as decide where to brek the text.
|
|
|
Cheers, I'll give it a go!!
Annabel
|
|
|
|
|
|
|
|