From Clomosy Docs

Revision as of 14:38, 22 August 2024 by ClomosyManager (talk | contribs)

TclDrawForm is a custom form object that contains many graphic objects and properties. It can be used for drawing operations and can present drawing, graphics or other visual interactions to the user. For example, it can give the user the ability to draw a picture or create graphics using drawing tools.

TclDrawForm has customizable properties and events. For example, it can respond to the user's mouse events and synchronize drawing operations with these events. It also provides direct access to graphic objects used for drawing.

It should start by making the identification process.

var
 MyDrawForm : TclDrawForm;

Let's create the form.

MyDrawForm := TclDrawForm.Create(Self);

The form can be given a dark and light theme. The clSetStyle property should be used for this. DarkSB is used for dark color and LightSB is used for light color.

MyDrawForm.clSetStyle(MyDrawForm.DarkSB); //MyDrawForm.LightSB

The DrawApp property of the TclDrawForm class is a property that enables this class to be used as a drawing application. The DrawApp feature provides the tools and functions to perform drawing operations using the properties and methods of the TclDrawForm component.

MyDrawForm.DrawApp(True);

Example:

TRObject Syntax
 var
   MyDrawForm : TclDrawForm;
 
 {
   MyDrawForm = TclDrawForm.Create(Self);
   MyDrawForm.clSetStyle(MyDrawForm.DarkSB); //MyDrawForm.DarkSB - MyDrawForm.LightSB
   MyDrawForm.DrawApp(True);  
 
   MyDrawForm.Run;
 }
Base Syntax
 var
   MyDrawForm : TclDrawForm;
 
 begin
   MyDrawForm := TclDrawForm.Create(Self);
   MyDrawForm.clSetStyle(MyDrawForm.DarkSB); //MyDrawForm.DarkSB - MyDrawForm.LightSB
   MyDrawForm.DrawApp(True);  
 
   MyDrawForm.Run;
 end;

Output:
TclDrawFormScreen.png

Also See