dcsimg
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5

Thread: dynamically generate labels with formating

  1. #1
    Join Date
    May 2009
    Posts
    92

    dynamically generate labels with formating

    Dear all,

    If I am building an application with a form. On it, I hope it will dynamically generate the labels e.g. 1000 set at a specified location with size. I hope I can add some formating such as fonts.
    Could you give me some source code???

  2. #2
    Join Date
    Jun 2001
    Location
    Melbourne/Aus (C# .Net 4.0)
    Posts
    686

    Re: dynamically generate labels with formating

    You may wish to consider using the TableLayoutPanel. This will allow you to more easily layout many labels (controls) and you don't need to worry about calculating individual locations for the labels when the form is resized etc.
    Rob
    -
    Ohhhhh.... Old McDonald was dyslexic, E O I O EEEEEEEEEE.......

  3. #3
    Join Date
    Oct 2002
    Location
    Timisoara, Romania
    Posts
    14,360

    Re: dynamically generate labels with formating

    You said 1000 labels? On a single form?! That is way too much. Please explain what you are actually trying to do, I'm sure there must be a better approach. I wouldn't like to have an application with 1000+ controls on a single window.
    Marius Bancila
    Home Page
    My CodeGuru articles

    I do not offer technical support via PM or e-mail. Please use vbBulletin codes.

  4. #4
    Join Date
    May 2009
    Location
    Bengaluru, India
    Posts
    435

    Re: dynamically generate labels with formating

    I guess what he meant was a LABEL control displaying "1000" on it and not 1000 label controls all over the window !!

  5. #5
    Join Date
    Jun 2001
    Location
    Melbourne/Aus (C# .Net 4.0)
    Posts
    686

    Re: dynamically generate labels with formating

    Minesweeper 2?
    Rob
    -
    Ohhhhh.... Old McDonald was dyslexic, E O I O EEEEEEEEEE.......

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)