Live
博客园
::
首页
::
联系
::
订阅
::
管理
4 Posts :: 1 Stories :: 55 Comments :: 0 Trackbacks
公告
昵称:
一唯
园龄:
5年10个月
粉丝:
0
关注:
0
搜索
常用链接
我的随笔
我的评论
我的参与
最新评论
我的标签
随笔分类
IM(2)
ORM相关(1)
控件&组建(1)
随笔档案
2006年8月 (1)
2006年7月 (1)
2006年3月 (2)
最新评论
关于Listview的问题,寻求帮助
我们的项目用ListView来显示数据,但是客户有一个要求:
第一例内容要靠中央。
但是 ColumnHeader 的TextAlign属性被写成这样:
public
HorizontalAlignment TextAlign
{
get
{
if
(
!
this
.textAlignInitialized
&&
(
this
.listview
!=
null
))
{
this
.textAlignInitialized
=
true
;
if
((
this
.Index
!=
0
)
&&
(
this
.listview.RightToLeft
==
RightToLeft.Yes))
{
this
.textAlign
=
HorizontalAlignment.Right;
}
}
return
this
.textAlign;
}
set
{
this
.textAlign
=
value;
if
((
this
.Index
==
0
)
&&
(
this
.textAlign
!=
HorizontalAlignment.Left))
{
this
.textAlign
=
HorizontalAlignment.Left;
}
if
(
this
.listview
!=
null
)
{
this
.listview.SetColumnInfo(
1
,
this
);
this
.listview.Invalidate();
}
}
}
所以直接设置TextAlign属性是不行的。
继承的话很多成员都是private,重写的话用到的很多类是internal的。
应该怎么来实现?
绿色通道:
好文要顶
关注我
收藏该文
与我联系
posted on 2006-03-24 13:43
一唯
阅读(262)
评论(1)
编辑
收藏
Feedback
1193458
#1楼
2008-05-12 12:39
北京网站制作[未注册用户]
改一下结构试试
回复
引用
注册用户登录后才能发表评论,请
登录
或
注册
,
返回博客园首页
。
首页
博问
闪存
新闻
园子
招聘
知识库
最新IT新闻
:
·
美国空军拟最多购买1.8万台iPad 2
·
伊朗封杀Gmail和Facebook等互联网服务
·
分析称专利之争让谷歌苹果两败俱伤
·
Android平台发现新型手机病毒Rootsmart
·
HTC首款Android4.0手机大曝光
»
更多新闻...
最新知识库文章
:
·
高级编程语言的发展历程
·
如何学习一门新的编程语言?
·
学习不同编程语言的重要性
·
为什么我喜欢富于表达性的编程语言
·
计算机专业的女生为什么要学编程
»
更多知识库文章...
China-pub 2011秋季教材巡展
China-Pub 计算机绝版图书按需印刷服务
Copyright @ 一唯
Powered by:
.Text
and
ASP.NET
Theme by:
.NET Monster