Results 1 to 3 of 3

Thread: [RESOLVED] vertical text in panel

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Dec 2006
    Posts
    91

    Resolved [RESOLVED] vertical text in panel

    Hai

    i want to display vertical text in a panel to display the days and time vertically.

    Please forward me any suggestions u have

    Thanks and Regards
    VInay Kumar

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

    Re: vertical text in panel

    You need to use the Panel's Paint event handler to draw the text using GDI+. Call the e.Graphics.DrawString method to draw the desired text. Some overloads allow you to specify a StringFormat object, which has a FormatFlags property. You can set the DirectionVertical bit for this value:
    Code:
    private void panel1_Paint(object sender, PaintEventArgs e)
    {
        e.Graphics.DrawString("Hello World",
                              this.panel1.Font,
                              Brushes.Black,
                              10,
                              10,
                              new StringFormat(StringFormatFlags.DirectionVertical));
    }
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Dec 2006
    Posts
    91

    Re: vertical text in panel

    Thank u so much for getting me the solution

    But when i kept scrollbar for panel as it should contain many controls, when i am changing the scroll the text is getting changed and getting deleted.



    Please solve this one too

    Waiting for ur reply


    Thanks and Regards
    VInay Kumar

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