zl程序教程

您现在的位置是:首页 >  后端

当前栏目

c# 中ToolStrip控件中button控件,显示文字和图标

c# 显示 控件 文字 图标 button
2023-09-11 14:16:44 时间

1.同时显示文字和图标

DisplayStyle   属性设为  ImageAndText    (DisplayStyle属性用来设置图标的显示状态为 图片、文字、图片和文字 )

ImageRelation   属性设为  ImageBeforeText   ( TextImageRelation属性 设置文字和图片的位置关系)

ImageAlign  属性更改图片位置

TextAlign   属性更改文字位置

image属性:设置按钮图标

Text属性: 设置显示的文字

 

2.只显示文字

DisplayStyle   属性设为 Text    

TextAlign   属性更改文字位置

Text属性: 设置显示的文字

 

3.只显示图标

DisplayStyle   属性设为  Image

ImageAlign  属性更改图片位置

image属性:设置按钮图标