Click here to Skip to main content
15,898,723 members
Please Sign up or sign in to vote.
3.00/5 (2 votes)
See more:
I really don't know why the size and location of controls in tabcontrol changes automatically in designer, first i thought maybe it's because of groupboxes, the i replaced the groupbox with panels, but i still have this problem in this solution and in another solution either.

here is the picture:

Picture

it seems that when i change the size of the form and close it and then reopen the form, the problem happens.

this is the designer of the form:
C#
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(682, 412);
            this.Controls.Add(this.btnExit);
            this.Controls.Add(this.tabControl);
            this.DoubleBuffered = true;
            this.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(178)));
            this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
            this.KeyPreview = true;
            this.MinimumSize = new System.Drawing.Size(618, 450);
            this.Name = "Form1";
            this.RightToLeft = System.Windows.Forms.RightToLeft.Yes;
            this.Text = "Transfer Data";
            this.MinimumSizeChanged += new System.EventHandler(this.Form1_MinimumSizeChanged);
            this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Form1_FormClosing);
            this.Load += new System.EventHandler(this.Form1_Load);
            this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.Form1_KeyDown);
            this.Resize += new System.EventHandler(this.Form1_Resize);
            this.contextMenu.ResumeLayout(false);
            this.tabControl.ResumeLayout(false);
            this.tabPage_TransferLog.ResumeLayout(false);
            this.panel4.ResumeLayout(false);
            this.panel3.ResumeLayout(false);
            this.panel3.PerformLayout();
            this.panel2.ResumeLayout(false);
            this.panel2.PerformLayout();
            this.panel1.ResumeLayout(false);
            this.panel1.PerformLayout();
            this.tabPage_Connections.ResumeLayout(false);
            this.tabPage_Connections.PerformLayout();
            ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
            this.tabPage_Settings.ResumeLayout(false);
            this.tabPage_Settings.PerformLayout();
            ((System.ComponentModel.ISupportInitialize)(this.transferLogBindingSource)).EndInit();
            this.ResumeLayout(false);


best regards.
Posted
Updated 2-May-14 21:14pm
v3
Comments
Richard MacCutchan 1-May-14 2:56am    
What situation?
noahdi 1-May-14 3:42am    
the location of controls are changed in tabcontrol
Richard MacCutchan 1-May-14 4:04am    
Where? Your picture gives no clue as to what is happening. Please edit your question and explain, and show, exactly what the problem is.
noahdi 3-May-14 3:14am    
the question has been improved, please take a look
Vedat Ozan Oner 3-May-14 9:55am    
which version of ide do you use? and can you create a simple form without any alteration and see what happens? I don't see any problem with my test form.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900