1
我有兩個彼此相鄰的標籤。這些標籤的值在運行時更改。 現在,如果第一個標籤的文字很長,那麼它與第二個標籤重疊。向右移動標籤以避免重疊
我想要的是第二個標籤右移避免重疊。
這可能嗎?
這裏是我的代碼:
//
// labelName
//
this.labelName.AutoSize = true;
this.labelName.BackColor = System.Drawing.Color.Transparent;
this.labelName.Font = new System.Drawing.Font("Tahoma", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.labelName.ForeColor = System.Drawing.Color.White;
this.labelName.Location = new System.Drawing.Point(6, 1);
this.labelName.Name = "labelName";
this.labelName.Size = new System.Drawing.Size(93, 16);
this.labelName.TabIndex = 55;
this.labelName.Tag = "useHeaderImage Core";
this.labelName.Text = "Name";
//
// labelShareSize
//
this.labelShareSize.AutoSize = true;
this.labelShareSize.BackColor = System.Drawing.Color.Transparent;
this.labelShareSize.Font = new System.Drawing.Font("Tahoma", 8.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(0)));
this.labelShareSize.ForeColor = System.Drawing.Color.White;
this.labelShareSize.Location = new System.Drawing.Point(206, 3);
this.labelShareSize.Name = "labelShareSize";
this.labelShareSize.Size = new System.Drawing.Size(46, 11);
this.labelShareSize.TabIndex = 56;
this.labelShareSize.Tag = "useHeaderImage Core";
this.labelShareSize.Text = "ShareSize";
感謝