1. Home
  2. Computing & Technology
  3. Delphi Programming

How to place a TCheckBox inside a TRichEdit

By Zarko Gajic, About.com

For the following example, create a new form, drop a TRichEdit (RichEdit1) on it and create the checkbox (acb) in the FormCreate() event.

~~~~~~~~~~~~~~~~~~~~~~~~~
procedure TForm1.FormCreate(Sender: TObject) ;
var
   Acb: TCheckBox;
begin
   RichEdit1.Left := 20;

   Acb := TCheckBox.Create(RichEdit1) ;
   Acb.Left := 30;
   Acb.Top := 30;
   Acb.Caption := 'my checkbox';
   Acb.Parent := RichEdit1;
end;
~~~~~~~~~~~~~~~~~~~~~~~~~

Delphi tips navigator:
» How to comment out large amount of source code
« How to translate a virtual-key to ASCII code

Zarko Gajic
Guide since 1998

Zarko Gajic
Delphi Programming Guide

Explore Delphi Programming
About.com Special Features

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

Easy ways to connect two computers for networking purposes. More >

  1. Home
  2. Computing & Technology
  3. Delphi Programming
  4. Using VCL Components
  5. TRadioButton, TCheckBox
  6. How to place a TCheckBox inside a TRichEdit

©2009 About.com, a part of The New York Times Company.

All rights reserved.