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

How to place a TCheckBox inside a TRichEdit

By , About.com Guide

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

Explore Delphi Programming
About.com Special Features

Holiday Central

What to eat, where to go, fun things to do and how to save money on the perfect gifts. More >

Family Tech Center

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. 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.