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 8807029
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T02:16:26+00:00 2026-06-14T02:16:26+00:00

I think this is an odd one. I have a screen (Windows Forms) created

  • 0

I think this is an odd one. I have a screen (Windows Forms) created using the Forms Designer. I now want to programmatically change the width of one of the controls, ie at runtime, according to some or other criterion.

My problem is that I can’t seem to do this. My approach is to assign a new value to the Width property somewhere after the form class InitializeComponent() method has been executed (say at the end of the form constructor). A watch shows me the control property has been changed, but the subsequently displayed screen ignores the new value and uses the value assigned in InitializeComponent().

Am I trying to do something impossible? Is there some voodoo in the background that blocks this for a control created by the Designer, or am I just going about it the wrong way?

  • 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-06-14T02:16:27+00:00Added an answer on June 14, 2026 at 2:16 am

    Have you tried handling an event for when the Form is loaded and in view? Something like: this.Loaded += MyLoadedEventHandler; In the method MyLoadEventHandler adjust the width. – Davio 2 hours ago

    That did the trick.

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

Sidebar

Related Questions

Odd one this. I am using NHibernate with one website. I have configured log4net
I have this odd situation and I can't think of a solution for it.
Sorry for the odd question but this is one that makes me want to
I think this could be a very easy question for you. But I have
I think this is a simple and a silly question. I have included a
I think this is nearly impossible or very tricky. I'm using CriteriaBuilder, JPA 2.0,
I think this is mostly because I'm new to PHP OOP, but I have
I have no clue how to achieve this, I tried for hours now. I
I don't think this is possible, but thought someone might have a nifty idea
This is an odd one for me but I am also new to Spark.

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.