-
Mar 15th, 2021, 11:19 PM
#1
Thread Starter
Fanatic Member
How do you create a chain that moves from bottom to vertical ?
I am learning to write code that moves a text string from bottom to vertical. What controls in winform do this ?
-
Mar 15th, 2021, 11:26 PM
#2
Re: How do you create a chain that moves from bottom to vertical ?
A control that displays text is called a Label and I'm quite sure that you already know that. Maybe you could provide an actual explanation of the actual problem. What does this even mean?
moves a text string from bottom to vertical
It's nonsensical as it is. Does that mean horizontal text that changes to vertical text? Horizontal text that remains horizontal but moves upwards? I understand that English is not your native language but I've said before that that means that you need to try harder to provide a clear explanation and you still make no effort to be clear, just posting as few words as posible.
-
Mar 15th, 2021, 11:28 PM
#3
Re: How do you create a chain that moves from bottom to vertical ?
Also, are you really using C# 2.0? That seems hard to believe. They haven't added new version prefixes for some time because it's not so relevant these days so why select a version at all if they don't have the one you're actually using? Or are you actually trying to indicate that you're targeting .NET Framework 2.0? If so, that's not what that prefix means.
-
Mar 16th, 2021, 02:19 AM
#4
Thread Starter
Fanatic Member
Re: How do you create a chain that moves from bottom to vertical ?
I still use .NET Framework 4.0. You ask me why choosing .NET Framework 2.0 means I want to find examples from .NET Framework 2.0 and up, this doesn't affect much code examples, the examples under .NET Framework 2.0 are almost difficult to apply into reality for computers today.
I know the label control will create text horizontally, but the label of the Visual Studio suite cannot display many lines so I don't select the label. Internet, I found the webBrowser control can do this but I don't know how to write code, in my opinion webBrowser control will display the text will be more crisp and smoother than the control label because it supports html code. I know my english is not good but I will try to put a better expression for you if you ask me a lot of questions. You can see the attached image describing the bottom-up text in the left pane, I know this topic is not new, but sometimes I want to find this example but it is not available for a complete example.
-
Mar 16th, 2021, 07:29 AM
#5
Re: How do you create a chain that moves from bottom to vertical ?
The label CAN display multiple lines... it just doesn't do it automatically. You have to change MultiLine (I think that's right) property to True (False by default). OR it maybe called AutoWrap... crap, now I gotta go look it up..
Neither... It's AutoSize, and it's True by default. If you set it to False, then size the label to the size you want, then you can display multiple lines. Then there is the TextAlign property which you can then set to any of the ContentAlignment values, including one of three that include "bottom" so that the text flows from the bottom upward.
Took me one minute in the documentation to find this all out:
https://docs.microsoft.com/en-us/dot...tframework-2.0
https://docs.microsoft.com/en-us/dot...tframework-2.0
https://docs.microsoft.com/en-us/dot...tframework-2.0
https://docs.microsoft.com/en-us/dot...tframework-2.0
-tg
-
Mar 16th, 2021, 11:55 PM
#6
Thread Starter
Fanatic Member
Re: How do you create a chain that moves from bottom to vertical ?
visual studio label does not have MultiLine, does not have AutoWrap, I see the links you send do not have this attribute, you are check it
-
Mar 17th, 2021, 12:08 AM
#7
Re: How do you create a chain that moves from bottom to vertical ?
Your trying to create a problem when none exists. By default, AutoSize is set to True on a Label control. That means that the Label will automatically expand to fit the text you provide. If that text contains line breaks then the Label will expand vertically. If you set AutoSize to False then the Label will automatically wrap the text you provide if a line is wider than the Label. It will wrap on spaces if possible but it will wrap regardless. Here's some code:
csharp Code:
label1.Text = "Hello\r\nGoodbye";
label2.Text = "Hello Goodbye Hello Goodbyeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee";
Here's the result:
The first Label has AutoSize set to True and the second one doesn't.
-
Mar 17th, 2021, 07:19 AM
#8
Re: How do you create a chain that moves from bottom to vertical ?
Originally Posted by dong
visual studio label does not have MultiLine, does not have AutoWrap, I see the links you send do not have this attribute, you are check it
I did say it was neither, and that it was the AutoSize property instead. And the links do work. I did check them multiple times. In fact originally they were for .NET 5, and I had to change them to Framework 2.0 and re-tested them before I posted them. If they don't work for you, I don't know what to say, but maybe the problem is on your end, or somewhere between your end and Microsoft.
Regardless, play with the AutoSize and TextAlign properties, I think that's what you're looking for.
-tg
-
Mar 18th, 2021, 02:22 AM
#9
Thread Starter
Fanatic Member
Re: How do you create a chain that moves from bottom to vertical ?
Sorry 2 you. I am using 4.0 properties you said for sure in version 5.0 I have not tried version 5.0, I write the text to run in the label to use timer but when running the lable control running in the form, I want to run the text in the label Should the label control run in the form, what properties do I set ?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|