⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 unit1.cpp

📁 与Action相结合,可以解决中文件显示乱码
💻 CPP
字号:
//---------------------------------------------------------------------------
#include <vcl\vcl.h>
#pragma hdrstop

#include "Unit1.h"
//---------------------------------------------------------------------------
#pragma link "RichView"
#pragma link "RVScroll"
#pragma link "RVStyle"
#pragma link "RVTable"
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
	: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TForm1::FormCreate(TObject *Sender)
{
  rv->AddNL("Virtual Greengrocery",0,1);
  rv->AddNL("",0,1);
  TRVTableItemInfo*table = new TRVTableItemInfo(2,2,rv->RVData);
  table->BorderColor = clSilver;
  table->BorderStyle = rvtbColor;
  table->BorderWidth = 2;

  table->Cells[0][0]->Clear();
  table->Cells[1][0]->Clear();
  table->Cells[0][1]->Clear();
  table->Cells[1][1]->Clear();
  table->Cells[0][0]->AddNL("Select fruits:",0,0);
  table->Cells[1][0]->AddNL("Select vegetables:",0,0);
  table->Cells[0][0]->BestWidth = 200;
  table->Cells[0][1]->BestWidth = 120;
  table->CellPadding = 5;
  table->ParaNo = 1;

  TRVComboItemInfo*item = new TRVComboItemInfo(rv->RVData, 1, "");
  item->MinWidth = 100;
  item->Items->Add("apple");
  item->Items->Add("banana");
  item->Items->Add("pear");
  table->Cells[0][1]->AddItem("", item);

  item = new TRVComboItemInfo(rv->RVData, 1, "");
  item->Items->Add("cucumber");
  item->Items->Add("tomato");
  item->MinWidth = 100;
  table->Cells[1][1]->AddItem("", item);
  rv->AddItem("", table);
  rv->AddNL("(click the gray square to select)",0,1);
  rv->Format();
}
//---------------------------------------------------------------------------

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -