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

📄 inplaceeditorsdemovalue.cpp

📁 胜天进销存源码,国产优秀的进销存
💻 CPP
字号:
//---------------------------------------------------------------------------

#include <vcl.h>
#pragma hdrstop

#include "InPlaceEditorsDemoValue.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TfrmValueEditors *frmValueEditors;
//---------------------------------------------------------------------------
__fastcall TfrmValueEditors::TfrmValueEditors(TComponent* Owner)
	: TEditorDemoBaseFrame(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TfrmValueEditors::PaintBox1Paint(TObject *Sender)
{
  PaintBox1->Canvas->Font->Name = FFontName;
  PaintBox1->Canvas->Font->Size = FFontSize;
  AnsiString AStrings[3] = {FDate, FTime, FValue};
  DrawText(AStrings, PaintBox1, 3);
}
//---------------------------------------------------------------------------
void __fastcall TfrmValueEditors::SetParameters(int AFontSize, AnsiString ADate, AnsiString ATime, Currency AMoney)
{
  FFontName = "Times New Roman";
  FFontSize = (AFontSize + 8) / 2;
  FDate = "Date: " + ADate;
  FTime = "Time: " + ATime;
  TVarRec args = AMoney;
  FValue = Format("Value: %m", &args, 0);
  PaintBox1->Invalidate();
}

⌨️ 快捷键说明

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