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

  • Home
  • SEARCH
  • 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 265691
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T22:47:31+00:00 2026-05-11T22:47:31+00:00

I have to enable all the text in a winforms application to be replaced;

  • 0

I have to enable all the text in a winforms application to be replaced; it is an old application and is in “maintenance”. The application was written in .NET v1.1 and later bits of it in .NET v2 therefore it does not use any layout controls.

The problem I have is that I need to make the UI cope when a string is longer then the default string. However I don’t wish to make lots of changes to the code due to the risk.

In the past I have found that simple changes like adding a panel to a form and dragging the current controls on to it have lost event hook-up etc. Due to the way the WinForms designer moves the code about, it is very hard to use DIFF to spot this sort of problem. So wish to avoid any changes to the control tree if possible.

So I am looking for some sort of layout manager that I can just add to a form without having to change the rest of the code (or control tree) – any ideals?

Any other options I should be looking at?

(The people that are replacing the strings do not have the skill set to rearrange the controls themselves; it would also be a maintenance nightmare as label may need to have different values for each customer)

(Answers that say, “If I was you I would not start from here are not useful”)


Does anyone know of a layout manager that is external to the control tree? E.g I can point it at a form and it will take over the layout of the controls, without having to make all the controls children of the layout manager.


see also this thread on the msdn Forums.

  • 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-11T22:47:31+00:00Added an answer on May 11, 2026 at 10:47 pm

    I don’t have much experience with layout managers, and I’m not really a UI designer, so I am hesitant about replying, but seeing that no-one else seems to be, I chip in with my thoughts.

    If your only problem is that you don’t trust the designer to do the cut and paste (ie you trust it to do the re-sizing), then you can do that part manually.

    What I have done in the past (not because I don’t trust the designer, but because I find it is sometimes easier to do it this way,) is :

    (Assuming C# and adding a new panel to an existing form)

    1) Make sure I have a backup (usually in source control)

    2) Add the panel to the form (usually with the designer)

    3) Close the designer and open the code (xxx.cs or xxx.designer.cs) and find where it adds all the top level controls to the form and move all of them (apart from the panel) to add them to the panel.

    Ie you start with some like (hopefully with more meaningful names)

    this.form1.Controls.Add(this.label1);
    this.form1.Controls.Add(this.textBox1);
    etc.
    this.form1.Controls.Add(this.panel1);
    

    and end up with

    this.panel1.Controls.Add(this.label1);
    this.panel1.Controls.Add(this.textBox1);
    etc 
    
    this.form1.Controls.Add(this.panel1);
    

    Newer forms may use the syntax something like
    this.form1.Controls.AddRange(new System.Windows.Forms.Control[] {
    this.label1,
    this.TextBox1,
    etc
    this.panel1});

    but the principal is the same.

    4) Do another backup. (This is where I wished I had a source control package that allowed me to do a temporary/private/personal backup without make it visible to other people.)

    5) Open the form in the designer and check that all the controls are there.

    6) Start amending the layout as needed.

    Alternatively, I haven’t tried it, but I would be very surprised if you could not configure Beyond Compare (see http://www.scootersoftware.com) to just compare event hook up lines (ie those containing a += characters) and that should make it a lot easier to spot that if any have been lost.

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

Sidebar

Related Questions

I am trying to use page methods in my asp.net page. I have enable
When I setup IIS6 to develop projects locally I have to enable Integrated Windows
We have an existing WCF service that makes use of wsDualHttpBinding to enable callbacks
I have a number of custom controls that I am trying to enable designer
I'm trying to enable SqlCacheDependency through my StructureMap IoC, I'm using LinqToSql I have
How do I enable double-buffering of a control using C# (Windows forms)? I have
I am looking in to ways to enable a site to basically have something
In our CMS, we have a place in which we enable users to play
I am using jQuery UI and trying to disable all text boxes in a
I have a dropdown menu and I want to disable/enable a button on my

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.