使TListView header变成flat
来源:互联网 发布:东吴证券网上交易软件 编辑:程序博客网 时间:2024/05/01 04:15
How to set a flat style for TListView header
In this tip I want to show how to change a style for header in
TListView. For example, you may specify a flat header.
You may do it so:
1. to get the header handle for the listview
2. to read the current style attributes for the header
3. to modify a style
4. to apply the new style
5. to invalidate the listview
In the next code I show how to apply a flat style:
const
LVM_GETHEADER = LVM_FIRST + 31;
var
hHeader: THandle;
style: dWord;
begin
{to get the header handle for the listview}
hHeader := SendMessage(ListView1.Handle, LVM_GETHEADER, 0, 0);
{to get the current style attributes for the header}
style := GetWindowLong(hHeader, GWL_STYLE);
{to toggle the HDS_BUTTONS style}
style := style xor HDS_BUTTONS;
{to apply the new style}
SetWindowLong(hHeader, GWL_STYLE, style);
{to invalidate the listview}
SetWindowPos(ListView1.Handle, Form1.Handle, 0, 0, 0, 0, SWP_NOZORDER
or SWP_NOSIZE or SWP_NOMOVE or SWP_DRAWFRAME)
end;
Note if you run a code in Windows XP with enabled XP theming, you'll not
see any difference. But in all other cases you'll see a flat header for
ListView
- 使TListView header变成flat
- TListView控件的标题栏header高度
- 不用自绘(owner draw)就改变TListView header的字体
- Flat UI
- TListView组件使用方法
- tlistview使用--拖放操作
- delphi TListView的使用
- delphi TListView的使用
- TListView的使用
- 说说TListView滚动条
- TlistView显示文件图标
- TListView加入进度条
- TListView属性及用法
- TListView属性及用法
- header
- header
- header
- header
- 不用自绘(owner draw)就改变TListView header的字体
- 《正在爆发的互联网革命》——Are u ready?
- 通过HSODBC访问mysql的实现步骤
- 启动"Start SoftICE"提示的错误Errror code 31的解决办法
- 如何提高网站流量
- 使TListView header变成flat
- 零打碎敲学Android(四)—跳跃的火之意志!
- 解决ssl启动时要httpd输入密码的问题
- 华北计算所其中一道机试题,逆转字符串,但是单词顺序不变
- install vmtools on Suse 11
- 华北计算所面试
- 看下效果
- 秋如忆
- 新站4天如何让百度收录