我有一个包含的图像和文本的按钮:调整图像大小时调整
当我调整我的申请,我调整标签以适应新的按钮的高度,但图像不调整:
我看到了一个解决办法是图像设置为BackgroundImage
但它不符合我的按钮设计:
this.buttonClose.Dock = System.Windows.Forms.DockStyle.Fill;
this.buttonClose.Image = ((System.Drawing.Image)(resources.GetObject("buttonClose.Image")));
this.buttonClose.Name = "buttonClose";
this.buttonClose.Size = new System.Drawing.Size(482, 28);
this.buttonClose.Text = "Close";
this.buttonClose.TextAlign = ContentAlignment.MiddleRight;
this.buttonClose.TextImageRelation = TextImageRelation.ImageBeforeText;
this.buttonClose.UseVisualStyleBackColor = true;
this.buttonClose.Click += new System.EventHandler(this.buttonClose_Click);
[制作背景图像规模与按钮的大小(HTTPS的可能重复:// stackoverflow.com/questions/13357032/making-a-background-image-scale-with-button-size) – fuchs777
@ fuchs777正如我所说,我不想使用'BackgroundImage'来同时显示文字和图片 –
_I don不想使用BackgroundImage同时具有文本和图像_但是您__可以同时拥有BackgrondImage和!加上Stretch和Zoom的BackgroundImageLayout选项! – TaW