From Clomosy Docs
ClomosyAdmin (talk | contribs) No edit summary |
No edit summary |
||
| Line 34: | Line 34: | ||
</div> | </div> | ||
<div style="font-size: 14px;font-weight: normal;text-align:justify; max-width: 350px;"> | <div style="font-size: 14px;font-weight: normal;text-align:justify; max-width: 350px;"> | ||
<li>BackgroundColor</li> | |||
<li>BorderColor</li> | <li>BorderColor</li> | ||
<li>IsTransparent</li> | <li>IsTransparent</li> | ||
<li>IsFill</li> | <li>IsFill</li> | ||
<li>RoundHeight</li> | <li>RoundHeight</li> | ||
<li>RoundWidth</li> | <li>RoundWidth</li> | ||
<li>IsRound</li> | |||
<li>BorderWidth</li> | |||
<li>PictureAutoFit</li> | <li>PictureAutoFit</li> | ||
<li>PictureStretch</li> | <li>PictureStretch</li> | ||
| Line 48: | Line 48: | ||
</div> | </div> | ||
</div> | </div> | ||
</div> | </div> | ||
<br> | <br> | ||
<div class="alert alert-warning" role="alert" data-bs-theme="light"> | <div class="alert alert-warning" role="alert" data-bs-theme="light"> | ||
To learn the purpose and usage of the | To learn the purpose and usage of the <b>clProSettings</b> properties, please refer to [[Pro Object Properties| the page]]. | ||
</div> | </div> | ||
<b>Example</b><br> | <b>Example</b><br> | ||
<pre> | <pre> | ||
Var | Var | ||
| Line 104: | Line 77: | ||
ProImg1.clProSettings.PictureAutoFit = True; | ProImg1.clProSettings.PictureAutoFit = True; | ||
ProImg1.SetclProSettings(ProImg1.clProSettings); | ProImg1.SetclProSettings(ProImg1.clProSettings); | ||
} | } | ||
Latest revision as of 08:46, 16 April 2025
function AddNewProImage(AComponent: TCLComponent; xName: string): TClProImage;
AComponent : Specifies the parent of the object to be defined.
xName : The name of the defined image should be written.
TclProImage is used to add an image to a form. Adding visuals to an application makes it more attractive and user-friendly.
All of the TclImage features are available. Apart from this, border color, rounding borders, image stretching and fitting features are available.
Refer to the TclImage page for standard image usage.
| Feature | Use of | Definition |
|---|---|---|
| TclProImage | ProImage1 : TclProImage; | A variable belonging to the TclProImage class is created. |
| AddNewProImage | ProImage1 = Form1.AddNewProImage(Form1,'ProImage1'); | A new image is added to the form. |
In addition to the features of a standard image, TclProImage offers new and advanced features, which we will explain in detail below.
clProSettings Properties
To learn the purpose and usage of the clProSettings properties, please refer to the page.
Example
Var
Form1:TclForm;
ProImg1: TClProImage;
void SetImage;
{
ProImg1 = Form1.AddNewProImage(Form1,'ProImg1');
ProImg1.Align = alCenter;
ProImg1.Width = 150;
ProImg1.Height = 150;
ProImg1.clProSettings.BorderColor = clAlphaColor.clHexToColor('#fabd2');
ProImg1.clProSettings.RoundHeight = 10;
ProImg1.clProSettings.RoundWidth = 10;
ProImg1.clProSettings.BorderWidth = 2;
ProImg1.clProSettings.IsFill = True;
ProImg1.clProSettings.IsRound = True;
ProImg1.clProSettings.PictureSource = 'https://clomosy.com/demos/computerNetwork.png';
ProImg1.clProSettings.PictureAutoFit = True;
ProImg1.SetclProSettings(ProImg1.clProSettings);
}
{
Form1 = TclForm.Create(Self);
SetImage;
Form1.Run;
}