//---------------------------------------------------------------------------
// ListView详细研究
#include <vcl.h>
#include <stdio.h>
#pragma hdrstop
#include "Unit1.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
this->cnt=0;
//listview设置
this->lv1->ReadOnly = true;
this->lv1->RowSelect = true;
this->lv1->ViewStyle = vsReport;
}
//---------------------------------------------------------------------------
void __fastcall TForm1::btn_display1Click(TObject *Sender)
{
//设置测试数据
for (int i=0; i< lv1->Columns->Count; i++)
{
TListItem *list = lv1->Items->Add();
list->Caption = ++ this->cn
ListView关键技术研究 C++Builder
最新推荐文章于 2024-05-18 08:59:58 发布