object Form1: TForm1
Left =
Top =
Caption = 'Form1'
ClientHeight =
ClientWidth =
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -
Font.Name = 'Tahoma'
Font.Style = []
OldCreateOrder = False
OnCreate = FormCreate
OnDestroy = FormDestroy
PixelsPerInch =
TextHeight =
object lvErrMsgs: TListView
Left =
Top =
Width =
Height =
Align = alTop
BevelInner = bvNone
BevelOuter = bvNone
BorderWidth =
Columns = <
item
Caption = ' '
Width =
end
item
Caption = ####
Width =
end
item
Caption = ####
Width =
end
item
Caption = ####
Width =
end>
ColumnClick = False
DragCursor = crAppStart
FlatScrollBars = True
GridLines = True
HideSelection = False
Items.ItemData = {
05450000000100000000000000FFFFFFFFFFFFFFFF03000000FFFFFFFF000000
000003310031003100F85CC32603320032003200A85BC326057A007800630076
006200B059C326FFFFFFFFFFFF}
ReadOnly = True
RowSelect = True
ShowWorkAreas = True
TabOrder =
ViewStyle = vsReport
ExplicitTop = -
ExplicitWidth =
end
end
unit Unit1;

interface

uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.ComCtrls; type
TForm1 = class(TForm)
lvErrMsgs: TListView;
procedure FormCreate(Sender: TObject);
procedure FormDestroy(Sender: TObject);
private
FListViewOldWndProc: TWndMethod;
procedure ListViewNewWndProc(var Msg: TMessage);
{ Private declarations }
public
{ Public declarations }
end; var
Form1: TForm1; implementation
uses
CommCtrl; {$R *.dfm} procedure TForm1.FormCreate(Sender: TObject);
begin
FListViewOldWndProc := lvErrMsgs.WindowProc;
lvErrMsgs.WindowProc := ListViewNewWndProc;
end; procedure TForm1.FormDestroy(Sender: TObject);
begin
lvErrMsgs.WindowProc := FlistViewOldWndProc;
FListViewOldWndProc := nil;
end; procedure TForm1.ListViewNewWndProc(var Msg: TMessage);
var
hdn: ^THDNotify;
begin
if Msg.Msg = WM_NOTIFY then
begin
hdn := Pointer(Msg.lParam);
if (hdn.hdr.code = HDN_BeginTrackW) or (hdn.hdr.code = HDN_BeginTrackA) then
Msg.Result :=
else
FListViewOldWndProc(Msg);
end else
FListViewOldWndProc(Msg);
end; end.

delphi ListView 设置固定列宽的更多相关文章

  1. java表格操作之设置表格列宽

    设置所有列的宽度 /** * 设置所有列的列宽 * @param table * @param width */ public void setAllColumnWidth(JTable table, ...

  2. Dev gridView中设置自适应列宽和日期显示格式、金额的显示格式

    在Dev GridView控件中,数据库中表数据日期都是长日期格式(yyyy-MM-dd HH:mm:ss),但显示在控件变成短日期格式(yyyy-MM-dd),金额显示要显示精确的数值, 比如80. ...

  3. 使用像素单位设置 EXCEL 列宽或行高

    在导出 Excel 的时候, 经常要需要给列设置宽度或给行设置高度, 在使用 NPOI 或 EppPlus 等组件进行操作的时候, 列宽和行高的单位都不是像素, 好像是英寸,具体是啥也说不清. 平常在 ...

  4. Aspose.Cells设置自动列宽(最佳列宽)及一些方法总结

    /// <summary> /// 设置表页的列宽度自适应 /// </summary> /// <param name="sheet">wor ...

  5. 动态设置 GridView 列宽

    /// <summary>        /// 设置简单评语列的宽度        /// </summary>        /// <param name=&quo ...

  6. CSS表格固定列宽

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...

  7. 关于bootstrap table 固定列宽

    首先为table 设置 style="table-layout: fixed;" <table id="assessStage" data-height= ...

  8. WPF学习笔记(3):ListView根据内容自动调整列宽

    DataGrid中,只要不设置DataGrid的宽度和列宽度,或者将宽度设置为Auto,那么表格就会根据内容自动调整宽度,以显示所有内容.但如果是ListView,按以上方法设置,却达不到列宽自动调整 ...

  9. Java 设置Excel自适应行高、列宽

    在excel中,可通过设置自适应行高或列宽自动排版,是一种比较常用的快速调整表格整体布局的方法.设置自适应时,可考虑2种情况: 1.固定数据,设置行高.列宽自适应数据(常见的设置自适应方法) 2.固定 ...

随机推荐

  1. java抽象类详解

    前言 在没讲抽象类之前  我们先来看看 final关键字 final 修饰符 可以修饰 类.属性.方法 修饰类时  表示该类不能被继承   其他特征 跟普通的类一样 修饰 属性时 表示 改属性不能改变 ...

  2. 【Android】Android处理Home键方法小结

    实验几次之后(android4.1 和android4.2)发现在单个的activity里面有以下几个方法可以使用: 方法1:onSaveInstanceState方法 下面这个方法可以处理home的 ...

  3. php通过CURL模拟get提交请求

    方式一: $host = "http://jisunews.market.alicloudapi.com"; $path = "/news/get"; $met ...

  4. VS2017 cdkey

    Enterprise:NJVYC-BMHX2-G77MM-4XJMR-6Q8QF ProfessionalKBJFW-NXHK6-W4WJM-CRMQB-G3CDH

  5. JavaSE | IO流

    java.io.File类(文件和目录路径名的抽象表示形式) 如果希望在程序中操作文件和目录都可以通过File类来完成,File类能新建.删除.重命名文件和目录. File类是文件或目录的路径,而不是 ...

  6. K线图

    1.程序 <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <titl ...

  7. liunx命令简介

    图形界面和命令行要达到的目的是一样的,都是让用户控制计算机.然而,真正能够控制计算机硬件(CPU.内存.显示器等)的只有操作系统内核(Kernel),图形界面和命令行只是架设在用户和内核之间的一座桥梁 ...

  8. 大数据技术 - 通俗理解MapReduce之WordCount(三)

    上一章我们编写了简单的 MapReduce 程序,掌握这些就能编写大多数数据处理的代码.但是 MapReduce 框架提供给用户的能力并不止如此,本章我们仍然以上一章 word count 为例,继续 ...

  9. oracle中to_timestamp和to_date什么区别

    date类型是Oracle常用的日期型变量,时间间隔是秒.两个日期型相减得到是两个时间的间隔,注意单位是“天”. timestamp是DATE类型的扩展,可以精确到小数秒(fractional_sec ...

  10. 【DWM1000】 code 解密5一ACHOR 第一次回家Main 函数

    instance_run(); if((instance_data[0].monitor == 1) && ((portGetTickCnt() - instance_data[0]. ...