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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T03:55:06+00:00 2026-06-07T03:55:06+00:00

I’ve been messing around with something that should be simple. I’ve moved jobs and

  • 0

I’ve been messing around with something that should be simple.

I’ve moved jobs and trying to get some of the basic tools I have used before, but of course I don’t have the old source to look at.

We had extended panel to have some standard properties and functions (save, close, save and close).

But I can’t get the buttons to be positioned correctly on a resize. I put this ExtPanel on a form but the buttons keep disappearing as I resize, or don’t move as expected (frozen on bottom right).

The class

public partial class ExtPanel: UserControl
   {
   private System.Windows.Forms.Button btnSaveandClose;
   private System.Windows.Forms.Button btnCancel;
   private System.Windows.Forms.Button btnSave;

   public ExtPanel ()
      {
      InitializeComponent ();
      }

// misc things this class does...


}

public partial class ExtPanel
    {
    private void InitializeComponent ()
       {
        this.btnSaveandClose = new System.Windows.Forms.Button();
        this.btnCancel = new System.Windows.Forms.Button();
        this.btnSave = new System.Windows.Forms.Button();
        this.panel1 = new System.Windows.Forms.Panel();
        this.panel1.SuspendLayout();
        this.SuspendLayout();
        // 
        // btnSaveandClose
        // 
        this.btnSaveandClose.Location = new System.Drawing.Point(899, 689);
        this.btnSaveandClose.Name = "btnSaveandClose";
        this.btnSaveandClose.Size = new System.Drawing.Size(100, 30);
        this.btnSaveandClose.TabIndex = 0;
        this.btnSaveandClose.Text = "Save and Close";
        this.btnSaveandClose.UseVisualStyleBackColor = true;
        this.btnSaveandClose.Click += new System.EventHandler(this.Click_SaveandClose);
        this.btnSaveandClose.Anchor = ((System.Windows.Forms.AnchorStyles) ((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));

        // 
        // btnCancel
        // 
        this.btnCancel.Location = new System.Drawing.Point(687, 689);
        this.btnCancel.Name = "btnCancel";
        this.btnCancel.Size = new System.Drawing.Size(100, 30);
        this.btnCancel.TabIndex = 1;
        this.btnCancel.Text = "Cancel";
        this.btnCancel.UseVisualStyleBackColor = true;
        this.btnCancel.Click += new System.EventHandler(this.Click_Close);
        this.btnCancel.Anchor = ((System.Windows.Forms.AnchorStyles) ((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));

        // 
        // btnSave
        // 
        this.btnSave.Location = new System.Drawing.Point(793, 689);
        this.btnSave.Name = "btnSave";
        this.btnSave.Size = new System.Drawing.Size(100, 30);
        this.btnSave.TabIndex = 2;
        this.btnSave.Text = "Save";
        this.btnSave.UseVisualStyleBackColor = true;
        this.btnSave.Click += new System.EventHandler(this.Click_Save);
        this.btnSave.Anchor = ((System.Windows.Forms.AnchorStyles) ((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));

        // 
        // panel1
        // 
        this.panel1.AutoScroll = true;
        this.panel1.Controls.Add(this.btnSave);
        this.panel1.Controls.Add(this.btnCancel);
        this.panel1.Controls.Add(this.btnSaveandClose);
        this.panel1.Location = new System.Drawing.Point(0, 0);
        this.panel1.Name = "panel1";
        this.panel1.Size = new System.Drawing.Size(1008, 730);
        this.panel1.TabIndex = 0;
        // 
        // ExtPanel
        // 
        this.Controls.Add(this.panel1);
        this.Name = "ExtPanel";
        this.Size = this.panel1.Size;
        this.Click += new System.EventHandler(this.click_this);
        this.panel1.ResumeLayout(false);
        this.ResumeLayout(false);

        }

    #endregion

    private System.Windows.Forms.Panel panel1;


}
  • 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-07T03:55:07+00:00Added an answer on June 7, 2026 at 3:55 am

    Have you tried anchoring the button?

    …I missed the anchoring code.

    If you have a button in the lower right-hand corner that you want to stay in the lower right-hand corner when resizing the form, set it’s anchor properties to Bottom, Right.

    Update:
    I loaded your code. You have a panel inside of ExtPanel. If you dock (Fill) that panel then you should be working fine by resizing ExtPanel.

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

Sidebar

Related Questions

I have just tried to save a simple *.rtf file with some websites and
I am doing a simple coin flipping experiment for class that involves flipping a
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I'm trying to create an if statement in PHP that prevents a single post
I have a jquery bug and I've been looking for hours now, I can't
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
For some reason, after submitting a string like this Jack’s Spindle from a text
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has

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.