- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我有一个在 TListView 控件上使用 LV_VIEW_TILE 的代码:
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics,
Controls, Forms, Dialogs, ComCtrls, CommCtrl,
StdCtrls;
procedure TileView(aListView: TListView);
var
ti: TLVTILEINFO;
Order: array of Integer;
tvi: TLVTILEVIEWINFO;
i: integer;
begin
ListView_SetView(aListView.Handle, LV_VIEW_TILE);
for i := 0 to aListView.Items.Count - 1 do begin
FillChar(ti, SizeOf(ti), 0);
ti.cbSize := SizeOf(ti);
// First item
ti.iItem := i;
// Specifying the order for three columns
ti.cColumns := 4;
// Array initialization
SetLength(order, ti.cColumns);
// The order is 2nd, 3rd and 4th columns
order[0] := 1;
order[1] := 2;
order[2] := 3;
order[3] := 4;
ti.puColumns := PUINT(order);
ListView_SetTileInfo(aListView.Handle, ti);
end;
tvi.cbSize := Sizeof(tvi);
tvi.dwMask := LVTVIM_COLUMNS;
// Requesting space to draw the caption + 3 subitems
tvi.cLines := aListView.Columns.Count;
ListView_SetTileViewInfo(aListView.Handle, tvi);
end;
procedure TForm3.FormCreate(Sender: TObject);
var V: TListView;
A: TListItem;
begin
V := TListView.Create(Self);
V.Parent := Self;
V.Align := alClient;
V.Columns.Add;
A := V.Items.Add;
A.Caption := 'Item A';
A.SubItems.Add('Sub A');
A := V.Items.Add;
A.Caption := 'Item B';
A.SubItems.Add('Sub B');
TileView(V);
end;
使用Delphi 2007编译并构建代码并在Windows XP中运行该应用程序,它显示:
用Delphi XE2编译相同的代码并在Windows XP中运行,显示:
在Delphi XE2中编译时不显示子项。
两个 Delphi 2007/XE2 应用程序都显示 Windows 7 中的平铺 View 子项。
我尝试将 list 嵌入应用程序的资源中或作为外部文件:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity
type="win32"
name="DelphiApplication"
version="1.0.0.0"
processorArchitecture="*"/>
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
publicKeyToken="6595b64144ccf1df"
language="*"
processorArchitecture="*"/>
</dependentAssembly>
</dependency>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
<requestedPrivileges>
<requestedExecutionLevel
level="asInvoker"
uiAccess="false"/>
</requestedPrivileges>
</security>
</trustInfo>
</assembly>
知道为什么 Delphi XE2 编译的应用程序在 Windows XP 中不显示平铺 View 吗?
最佳答案
Delphi XE2中的Unit Winapi.CommCtrl.pas定义:
tagLVTILEINFO = record
cbSize: UINT;
iItem: Integer;
cColumns: UINT;
puColumns: PUINT;
piColFmt: PInteger;
end;
但是MSDN API定义为:
typedef struct LVTILEINFO {
UINT cbSize;
int iItem;
UINT cColumns;
PUINT puColumns;
#if (_WIN32_WINNT >= 0x0600)
int *piColFmt;
#endif
} LVTILEINFO, *PLVTILEINFO;
piColFmt 不应该在 Windows XP 平台上使用。删除 piColFmt 应该可以在 Windows XP 中使用。
关于德尔福XE2 : TListView as tile view not working in Windows XP,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9221835/
是否有适用于 Delphi 2006/2007/2009 的 FitNesse 版本? 如果可以的话我在哪里可以找到它? 还有其他类似 FitNesse 的程序可以在 Delphi 2006 上运行吗
在 MDI 应用程序中有一个打开的模态表单 A。表单 B 从表单 A 中显示为模态。 如何在调用模态表单 B 后关闭模态表单 A? 最佳答案 模态意味着终生嵌套。当一个模态表单打开另一个模态表单时,第
我一直在写一些通过 URL 下载指定网页源代码的函数: function GetWebPage(const url: string): tStringList; var idHttp: TidHt
我正在寻找一种在 Delphi 中使用我的网络摄像头的方法,主要用于抓取图片,由于某些原因我无法使用 TWAIN 驱动程序。 最佳答案 尝试这些资源 DSPack DSPack is a set of
我正在寻找用于 delphi 的数据感知 TreeView 什么是最好用的? 最佳答案 Virtual TreeView 是最快的,功能最多的,最好的,而且是免费的!(对于数据感知,有免费的 desc
这个问题已经有答案了: How to copy the properties of one class instance to another instance of the same class?
我想为我的应用程序使用大型倒十字光标。但我的代码使光标背景反转。光标仍为白色。 var IconInfo: TIconInfo; AndMask, Bmp: TBitmap; w, h:
[DCC Fatal Error] Unit1.pas(7): F1026 File not found: 'MyBitBtn.dcu' Unit1 是用于测试目的的 VCL 表单。 我已经安装了一个
就目前情况而言,这个问题不太适合我们的问答形式。我们希望答案得到事实、引用资料或专业知识的支持,但这个问题可能会引发辩论、争论、民意调查或扩展讨论。如果您觉得这个问题可以改进并可能重新开放,visit
是否可以删除 TabSheet 的边框(~4px)?我使用 PageControl 作为开关面板,而不是框架、窗口等。我希望一切都是直的。 最佳答案 unit Unit1; interface use
我有java代码从文本文件填充 HashMap 。 HashMap data = new HashMap(); 我用它来制作键值对。值是一个字符串数组。我必须迭代键值对的每个可能的组合(因此还必须迭代
如何更改mp3文件的恒定比特率(CBR)? (例如64kbps-128kbps-192kbps) 最佳答案 您需要重新编码mp3。由于我不知道用Delphi编写的mp3编解码器不错,因此您需要在c库(
当我迭代窗体上的控件时,我会看到在设计时或运行时放置在其中的控件。它们都是TEdit,Tmemo,TComboBox等类型的... 但是,总有八种我不认识。我可以跳过它们,因为它们不是我感兴趣的类型,
我认为这是一个愚蠢的问题..但是..当在Delphi中声明另一个类的子类时, children 是否直接获得了 parent 的方法? 解释: 名为“P”的类是名为“C”的类的父类,“P”类有一个名为
正在尝试将数据发布到 https://www.facebook.com/login.php使用突触 delphi 库但没有任何结果。帖子数据来自 mozila headers viewer。 答案?
我在使用 PHP + Delphi 9 + Firebird 检索大量数据时遇到问题。 应用程序屏幕截图 我在 Delphi 应用程序中有一个名为 "checks"的按钮,当我单击该按钮时,它会根据函
我正在将我的 Delphi 7 应用程序迁移到 Delphi 2010。我们使用了 Open XML(来自 http://www.philo.de/)。 在 Delphi 2010 中,它似乎已经内置
在以下代码中: type TDoubleDWORD = record L, H: Longint; end; function BitSelection(const Block:
我喜欢这个工具栏。我在哪里可以找到它? 谢谢 最佳答案 您可以实现与使用标准 Delphi 组件类似的功能(至少非常类似): 将 TControlBar 添加到表单 将其 DrawingStyle 设
如何使用 Zeos 在 firebird 中创建 autoinc 字段。 -布拉德 最佳答案 Firebird FAQ #29中有解释。请参阅该页面的底部。 关于德尔福 Firebird 汽车公司,我
我是一名优秀的程序员,十分优秀!