LoginSignup
0
1

More than 5 years have passed since last update.

c++ builder XE4, 10.2 Tokyo > 動的生成 > TLabelを動的に生成する

Last updated at Posted at 2015-10-09
動作環境
C++ Builder XE4 on Windows 7 pro
Rad Studio 10.2 Tokyo Update 2 (追記: 2017/12/26)

TLabelをフォームデザインでなく、コードで生成したい。

参考
https://groups.google.com/forum/#!topic/delphicbuilder-ml-archive/h3lxsfy1ABI

void __fastcall TPressuresForm::Button2Click(TObject *Sender)
{
    TLabel *work;

    work = new TLabel( this );
    work->Name = L"L_test";
    work->Height = 20;
    work->Width = 100;
    work->Left = 10;
    work->Top = 5;
    work->Caption = L"TEST LABEL";
    work->Visible = true;
    work->Parent = this;
}
0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1