Results 1 to 9 of 9

Thread: How do you create a chain that moves from bottom to vertical ?

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Mar 2008
    Posts
    517

    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 ?

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,297

    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.

  3. #3
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,297

    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.

  4. #4

    Thread Starter
    Fanatic Member
    Join Date
    Mar 2008
    Posts
    517

    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.
    Name:  LJbwj00.jpg
Views: 180
Size:  23.1 KB

  5. #5
    Smooth Moperator techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,531

    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
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  6. #6

    Thread Starter
    Fanatic Member
    Join Date
    Mar 2008
    Posts
    517

    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

  7. #7
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,297

    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:
    1. label1.Text = "Hello\r\nGoodbye";
    2. label2.Text = "Hello Goodbye Hello Goodbyeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee";
    Here's the result:

    Name:  Labels.png
Views: 172
Size:  19.3 KB

    The first Label has AutoSize set to True and the second one doesn't.

  8. #8
    Smooth Moperator techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,531

    Re: How do you create a chain that moves from bottom to vertical ?

    Quote Originally Posted by dong View Post
    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
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  9. #9

    Thread Starter
    Fanatic Member
    Join Date
    Mar 2008
    Posts
    517

    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
  •  



Click Here to Expand Forum to Full Width