ControlPaint.DrawMenuGlyph 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
在菜单项控件上绘制菜单标志符号。
重载
DrawMenuGlyph(Graphics, Rectangle, MenuGlyph) |
在菜单项控件上指定的边界内、指定的表面上,绘制指定的菜单标志符号。 |
DrawMenuGlyph(Graphics, Rectangle, MenuGlyph, Color, Color) |
在菜单项控件上指定的边界内、指定的图面上绘制指定的菜单标志符号,用 |
DrawMenuGlyph(Graphics, Int32, Int32, Int32, Int32, MenuGlyph) |
在菜单项控件上指定的边界内、指定的表面上,绘制指定的菜单标志符号。 |
DrawMenuGlyph(Graphics, Int32, Int32, Int32, Int32, MenuGlyph, Color, Color) |
在菜单项控件上指定的图面上,以指定的坐标、高度和宽度绘制指定的菜单标志符号,用 |
DrawMenuGlyph(Graphics, Rectangle, MenuGlyph)
在菜单项控件上指定的边界内、指定的表面上,绘制指定的菜单标志符号。
public:
static void DrawMenuGlyph(System::Drawing::Graphics ^ graphics, System::Drawing::Rectangle rectangle, System::Windows::Forms::MenuGlyph glyph);
public static void DrawMenuGlyph (System.Drawing.Graphics graphics, System.Drawing.Rectangle rectangle, System.Windows.Forms.MenuGlyph glyph);
static member DrawMenuGlyph : System.Drawing.Graphics * System.Drawing.Rectangle * System.Windows.Forms.MenuGlyph -> unit
Public Shared Sub DrawMenuGlyph (graphics As Graphics, rectangle As Rectangle, glyph As MenuGlyph)
参数
注解
当所有者绘图 MenuItem 控件时,需要验证属性值以确定要绘制或删除的正确字形。 例如,当 MenuItem.Checked 属性设置为 true
时,必须调用 Checkmark 的值 MenuGlyph 才能在 上 MenuItem绘制复选标记。
另请参阅
适用于
DrawMenuGlyph(Graphics, Rectangle, MenuGlyph, Color, Color)
public:
static void DrawMenuGlyph(System::Drawing::Graphics ^ graphics, System::Drawing::Rectangle rectangle, System::Windows::Forms::MenuGlyph glyph, System::Drawing::Color foreColor, System::Drawing::Color backColor);
public static void DrawMenuGlyph (System.Drawing.Graphics graphics, System.Drawing.Rectangle rectangle, System.Windows.Forms.MenuGlyph glyph, System.Drawing.Color foreColor, System.Drawing.Color backColor);
static member DrawMenuGlyph : System.Drawing.Graphics * System.Drawing.Rectangle * System.Windows.Forms.MenuGlyph * System.Drawing.Color * System.Drawing.Color -> unit
Public Shared Sub DrawMenuGlyph (graphics As Graphics, rectangle As Rectangle, glyph As MenuGlyph, foreColor As Color, backColor As Color)
参数
注解
当所有者绘图 MenuItem 控件时,需要验证属性值以确定要绘制或删除的正确字形。 例如,当 MenuItem.Checked 属性设置为 true
时,必须调用 Checkmark 的值 MenuGlyph 才能在 上 MenuItem绘制复选标记。
另请参阅
适用于
DrawMenuGlyph(Graphics, Int32, Int32, Int32, Int32, MenuGlyph)
在菜单项控件上指定的边界内、指定的表面上,绘制指定的菜单标志符号。
public:
static void DrawMenuGlyph(System::Drawing::Graphics ^ graphics, int x, int y, int width, int height, System::Windows::Forms::MenuGlyph glyph);
public static void DrawMenuGlyph (System.Drawing.Graphics graphics, int x, int y, int width, int height, System.Windows.Forms.MenuGlyph glyph);
static member DrawMenuGlyph : System.Drawing.Graphics * int * int * int * int * System.Windows.Forms.MenuGlyph -> unit
Public Shared Sub DrawMenuGlyph (graphics As Graphics, x As Integer, y As Integer, width As Integer, height As Integer, glyph As MenuGlyph)
参数
- x
- Int32
所绘制矩形左上角的 x 坐标。
- y
- Int32
所绘制矩形左上角的 y 坐标。
- width
- Int32
菜单标志符号的宽度。
- height
- Int32
菜单标志符号的高度。
注解
当所有者绘图 MenuItem 控件时,需要验证属性值以确定要绘制或删除的正确字形。 例如,当 MenuItem.Checked 属性设置为 true 时,调用 Checkmark 的值 MenuGlyph 以在 上 MenuItem绘制复选标记。
适用于
DrawMenuGlyph(Graphics, Int32, Int32, Int32, Int32, MenuGlyph, Color, Color)
public:
static void DrawMenuGlyph(System::Drawing::Graphics ^ graphics, int x, int y, int width, int height, System::Windows::Forms::MenuGlyph glyph, System::Drawing::Color foreColor, System::Drawing::Color backColor);
public static void DrawMenuGlyph (System.Drawing.Graphics graphics, int x, int y, int width, int height, System.Windows.Forms.MenuGlyph glyph, System.Drawing.Color foreColor, System.Drawing.Color backColor);
static member DrawMenuGlyph : System.Drawing.Graphics * int * int * int * int * System.Windows.Forms.MenuGlyph * System.Drawing.Color * System.Drawing.Color -> unit
Public Shared Sub DrawMenuGlyph (graphics As Graphics, x As Integer, y As Integer, width As Integer, height As Integer, glyph As MenuGlyph, foreColor As Color, backColor As Color)
参数
- x
- Int32
所绘制矩形左上角的 x 坐标。
- y
- Int32
所绘制矩形左上角的 y 坐标。
- width
- Int32
菜单标志符号的宽度。
- height
- Int32
菜单标志符号的高度。
注解
当所有者绘图 MenuItem 控件时,需要验证属性值以确定要绘制或删除的正确字形。 例如,当 MenuItem.Checked 属性设置为 true
时,必须调用 Checkmark 的值 MenuGlyph 才能在 上 MenuItem绘制复选标记。
另请参阅
适用于
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈