| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 408 人关注过本帖
标题:[求助]菜单问题
只看楼主 加入收藏
mojianpo
Rank: 1
等 级:等待验证会员
帖 子:213
专家分:0
注 册:2005-7-6
收藏
 问题点数:0 回复次数:2 
[求助]菜单问题
各位大虾,如何改变菜单(menu)中菜单项的字体的大小,及颜色?
我没找到他们的属性,是否必须使用代码设置?
搜索更多相关主题的帖子: 菜单 
2006-09-19 21:55
mojianpo
Rank: 1
等 级:等待验证会员
帖 子:213
专家分:0
注 册:2005-7-6
收藏
得分:0 

斑竹,帮帮我,
我想改变MenuItem 的Text属性中字体的大小?


我是莫建坡.电话:15910657130
2006-09-20 21:12
chenjin145
Rank: 1
等 级:禁止访问
帖 子:3922
专家分:0
注 册:2006-7-12
收藏
得分:0 

Private Sub MenuItem1_DrawItem(ByVal sender As Object, ByVal e As System.Windows.Forms.DrawItemEventArgs) Handles MenuItem1.DrawItem


Dim MyCaption As String = "Owner Draw Item1"

' Create a Brush and a Font with which to draw the item.
Dim MyBrush As System.Drawing.Brush = System.Drawing.Brushes.AliceBlue
Dim MyFont As New Font(FontFamily.GenericSerif, 14, FontStyle.Underline, GraphicsUnit.Pixel)
Dim MySizeF As SizeF = e.Graphics.MeasureString(MyCaption, MyFont)

' Draw the item, and then draw a Rectangle around it.
e.Graphics.DrawString(MyCaption, MyFont, MyBrush, e.Bounds.X, e.Bounds.Y)
e.Graphics.DrawRectangle(Drawing.Pens.Black, New Rectangle(e.Bounds.X, e.Bounds.Y, MySizeF.Width, MySizeF.Height))

End Sub

隨你怎麼設計


[url=javascript:alert(1);] [div]fdgfdgfdg\" on\"[/div] [/url]
2006-09-21 08:47
快速回复:[求助]菜单问题
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.013624 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved