Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 341835
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T10:44:44+00:00 2026-05-12T10:44:44+00:00

I am writing a .NET WinForms application that needs to display a list of

  • 0

I am writing a .NET WinForms application that needs to display a list of results in a nice formatted user-friendly fashion. Here’s how I’m hoping to display the data.

alt text http://img398.imageshack.us/img398/4336/imgdyu.png

The table must support a decent amount of data(>= 200 individual “data blocks”), and needs to be fairly fast. I’m unsure of the easiest way to accomplish this and I was hoping for some direction and advice. I created a quick prototype custom control that simply used a bunch a text boxes stacked on top of each other. It worked fairly well but Windows runs out of handles for the textboxes too quickly. I could create a custom textbox control, but it would be time consuming and I was wondering if there are any recommendations for alternative solutions? Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T10:44:45+00:00Added an answer on May 12, 2026 at 10:44 am

    You could use a third-party control for this (maybe), but here are some reasons why this is potentially a bad idea:

    1. third-party controls cost money
    2. third-party controls tend to suck
    3. third-party controls require you to distribute at least an additional DLL, over which you usually have no control
    4. even if the third-party control can ultimately do what you need, it will take you some time and effort to figure out how to use it, and how to hammer it into the shape you require

    For anything out of the ordinary (like what you’re doing), writing your own UserControl is the best way to go, for these (among others) reasons:

    1. writing your own UserControl is far and away the most fun thing you can do in .Net
    2. you will have to learn some things to do this well, but the knowledge you gain is immediately transferable to other problems and projects (whereas whatever you learn about using Initrode’s Infinite Wonderfulness Gridifier will only ever help you with using that particular control)
    3. there will be nothing additional to distribute with your application
    4. complete control over the source code
    5. free forever (with apologies to Evony)
    6. the sky is the limit – with any third-party control, you will ultimately run into something that it just can’t do, but if you’re doing it yourself, you can literally do anything you want

    Your particular problem (well described in your question, thanks to the graphics) is quite easy to do as a mostly owner-drawn UserControl (with a TextBox or two thrown in the mix). The only methods you’ll need from the System.Drawing.Graphics object are DrawRectangle, FillRectangle, MeasureString and DrawString. You won’t even need any documentation, as Intellisense will give you everything you need.

    If you run into trouble, I’ll write it for you for a chocolate chip cookie. 🙂

    Update: since you need the text to all be selectable, that makes this approach a bit more complicated. Implementing your own Textbox-type functionality is a gigantic pain in the petard, but a relatively simple solution is to add a real multi-line Textbox over top of any text-containing rectangle when the user clicks on it, and to put the rectangle’s text (pre-selected) into the Textbox. When this temporary Textbox loses focus (LostFocus), you draw the edited text into the rectangle and delete the Textbox. This way you only have one Textbox at a time in your UserControl.

    This version will cost you two cookies.

    Update 2: Here is a simple application that demonstrates how to use a single TextBox to make your entire control selectable and editable. And here is the source code.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.