Categories > WeAreDevs > Hangout >

[HELP] Parent panel doesn't resize when child panel resizes even though autosize is turned on

marcus__

S.K.I.D

vip

Posts: 444

Threads: 23

Joined: Nov, 2022

Reputation: 29

Posted

            // when using the following code, when the label resizes then guna2panel2 resizes but guna2panel1 doesnt resize so the label overflows, help please
            // guna2Panel1
            // 
            this.guna2Panel1.AutoSize = true;
            this.guna2Panel1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(35)))), ((int)(((byte)(35)))), ((int)(((byte)(35)))));
            this.guna2Panel1.BorderColor = System.Drawing.Color.White;
            this.guna2Panel1.BorderRadius = 30;
            this.guna2Panel1.BorderThickness = 2;
            this.guna2Panel1.Controls.Add(this.guna2Panel2);
            this.guna2Panel1.Location = new System.Drawing.Point(3, 3);
            this.guna2Panel1.Name = "guna2Panel1";
            this.guna2Panel1.Size = new System.Drawing.Size(159, 188);
            this.guna2Panel1.TabIndex = 0;
            // 
            // guna2Panel2
            // 
            this.guna2Panel2.AutoSize = true;
            this.guna2Panel2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(35)))), ((int)(((byte)(35)))), ((int)(((byte)(35)))));
            this.guna2Panel2.BorderColor = System.Drawing.Color.White;
            this.guna2Panel2.BorderThickness = 2;
            this.guna2Panel2.Controls.Add(this.label1);
            this.guna2Panel2.Location = new System.Drawing.Point(3, 42);
            this.guna2Panel2.Name = "guna2Panel2";
            this.guna2Panel2.Size = new System.Drawing.Size(153, 94);
            this.guna2Panel2.TabIndex = 1;
            // 
            // label1
            // 
            this.label1.AutoSize = true;
            this.label1.ForeColor = System.Drawing.Color.White;
            this.label1.Location = new System.Drawing.Point(3, 3);
            this.label1.MaximumSize = new System.Drawing.Size(148, 0);
            this.label1.Name = "label1";
            this.label1.Size = new System.Drawing.Size(147, 60);
            this.label1.TabIndex = 0;
            this.label1.Text = "hello world\r\ntoday im is going to do something\r\n";

yes i know this is wrong place

but when its in c# it just gets ccovered by other threads

  • 0

Added

@tempegoreng

idk how to keep it looking like  https://cdn.discordapp.com/attachments/897174066782421014/1085409428393689098/Screenshot_2023-03-15_114342.png when using dock

btw heres what i mean by overflow:

https://cdn.discordapp.com/attachments/897174066782421014/1085410014015004725/Screenshot_2023-03-15_115137.png

idk how to add just some space at the bottom

  • 0

Added

bump /charss

  • 0

Added

bump /charss

  • 0

Added

@tempegoreng

ive fixed it by just using a textbox instead of label

  • 0

!!!!!marcus__!!!!!#8611

https://cdn.discordapp.com/attachments/1066053366758780978/1078052772567597127/image.png

Users viewing this thread:

( Members: 0, Guests: 1, Total: 1 )