From Clomosy Docs

In Clomosy, clProSettings is used to define custom settings for professional components. This structure allows the behavior and appearance of components to be customized.

clProSettings

For pro components, there is an alternative usage for utilizing enhanced features apart from the properties of standard components. This usage is available through the clProSetting property. Through this, the following properties can be utilized:


Feature Use of Definition Components Using
TextSettings button1.clProSettings.TextSettings.Font.Style = [fsBold,fsItalic,fsUnderline]; A property that determines the text appearance of a text component. This property controls attributes such as the font's weight (fsBold), slant (fsItalic), and underline (fsUnderline). TclProLabel, TclProButton, TclProEdit, TclProDateEdit, TClProSearchEdit
FontColor button1.clProSettings.FontColor = clAlphaColor.clHexToColor('#ff00ac'); button1.clProSettings.FontColor = clAlphaColor.clRed; It is a property that specifies the color of the text displayed on a text component. If you want to use clAlphaColor, please visit the Color Constants page. TclProLabel, TclProButton, TclProEdit, TclProDateEdit, TClProSearchEdit
FontName button1.clProSettings.FontName = 'Algerian'; //for Windows It is used to customize the text font of a component. However, font selection varies depending on the platform. TclProLabel, TclProButton, TclProEdit, TclProDateEdit, TClProSearchEdit
FontSize button1.clProSettings.FontSize = 20; a property that specifies the size of the text font used in a text component. TclProLabel, TclProButton, TclProEdit, TclProDateEdit, TClProSearchEdit
FontVertAlign button1.clProSettings.FontVertAlign = palcenter; //palLeading, palCenter, palTrailing A property that specifies the vertical alignment of the text used in a text component.
  • palLeading: Aligns the text to the top.
  • palCenter: Aligns the text to the center of the component.
  • palTrailing: Aligns the text to the bottom of the component.
TclProLabel, TclProButton, TclProEdit, TclProDateEdit, TClProSearchEdit
FontHorzAlign button1.clProSettings.FontHorzAlign = palLeading;//palLeading, palCenter, palTrailing A property that specifies the horizontal alignment of the text used in a text component.
  • palLeading: Aligns the text to the left side of the component.
  • palCenter: Aligns the text to the center of the component.
  • palTrailing: Aligns the text to the right side of the component.
TclProLabel, TclProButton, TclProEdit, TclProDateEdit, TClProSearchEdit
BackgroundColor button1.clProSettings.BackgroundColor = clAlphaColor.clRed; button1.clProSettings.BackgroundColor = clAlphaColor.clHexToColor('#ff00ac'); It is a property that specifies the background color of a component. TclProLabel, TclProButton, TclProImage, TclProEdit, TclProListView, TclProListViewDesignerPanel, TclProPanel, TclProDateEdit, TClProSearchEdit
BorderColor button1.clProSettings.BorderColor = clAlphaColor.clBlue;
button1.clProSettings.BorderColor = clAlphaColor.clHexToColor('#ff00ac');
A property that specifies the border color of a component. If you want to use clAlphaColor, please visit the Color Constants page. TclProLabel, TclProButton, TclProImage, TclProEdit, TclProListView, TclProListViewDesignerPanel, TclProPanel, TclProDateEdit, TClProSearchEdit
IsTransparent button1.clProSettings.IsTransparent = True; A property that determines whether the background of a component is visible or not. When this property is set to "True", the background of the component becomes invisible, allowing other components or controls behind it to be visible. When set to "False", the background of the component becomes visible. TclProLabel, TclProButton, TclProImage, TclProEdit, TclProListView, TclProListViewDesignerPanel, TclProPanel, TclProDateEdit, TClProSearchEdit
IsFill button1.clProSettings.IsFill = False; A property that controls whether a component's background is filled with color or not. When this property is set to "True", the background color of the component is visible. When set to "False", the background color of the component is not visible. TclProLabel, TclProButton, TclProImage, TclProEdit, TclProListView, TclProListViewDesignerPanel, TclProPanel, TclProDateEdit, TClProSearchEdit
RoundHeight button1.clProSettings.RoundHeight = 20; A property that specifies the rounded corner height of a component. TclProLabel, TclProButton, TclProImage, TclProEdit, TclProListView, TclProListViewDesignerPanel, TclProPanel, TclProDateEdit, TClProSearchEdit
RoundWidth button1.clProSettings.RoundWidth = 20; A property that specifies the rounded corner width of a component. TclProLabel, TclProButton, TclProImage, TclProEdit, TclProListView, TclProListViewDesignerPanel, TclProPanel, TclProDateEdit, TClProSearchEdit
IsRound button1.clProSettings.IsRound = True; "IsRound" is a property that indicates whether the corners of an object are rounded or not. When this property is set to "True", the corners of the object are rounded; when set to "False", the corners are not rounded and remain flat. If this feature is desired to be used, RoundHeight and RoundWidth values ​​must be given. TclProLabel, TclProButton, TclProImage, TclProEdit, TclProListView, TclProListViewDesignerPanel, TclProPanel, TclProDateEdit, TClProSearchEdit
BorderWidth button1.clProSettings.BorderWidth = 20; A property that specifies the border width of a component. TclProLabel, TclProButton, TclProImage, TclProEdit, TclProListView, TclProListViewDesignerPanel, TclProPanel, TclProDateEdit, TClProSearchEdit
PictureAutoFit button1.clProSettings.PictureAutoFit = True; A property that determines whether the image inside a component that is capable of displaying images should automatically fit to the component's size or not. When this property is set to "True", the image is automatically resized to fit the component's size. When set to "False", if the image is larger than the component's size, it may be cropped or overflow. When using this property, the PictureSource property must also be used. TclProButton, TclProImage, TClProEdit, TClProSearchEdit
PictureStretch button1.clProSettings.PictureStretch = False; A property that determines whether the image in an image component should be stretched to fit the component's size exactly or not. When this property is set to "True", the image is automatically resized to fit exactly within the component's dimensions. When set to "False", the image remains in its original size, and if it doesn't fit within the component's dimensions, it may overflow or be cropped. When using this property, the PictureSource property must also be used. TclProButton, TclProImage, TClProEdit, TClProSearchEdit
PictureSource button1.clProSettings.PictureSource = 'https://clomosy.com/demos/chatGreen.png'; A property that specifies the source of the image to be assigned to an image component. TclProButton, TclProImage, TClProEdit, TClProSearchEdit
AutoSize Label1.clProSettings.AutoSize = True; This property determines whether the component's size will automatically adjust based on its content. When set to True, the component's size will automatically adjust to fit its content (for example, the text of a label or the caption of a button). When set to False, the component's size remains fixed, and the content will attempt to fit within this fixed size. TclProLabel
WordWrap Label1.clProSettings.WordWrap = True; WordWrap is a feature that automatically wraps text to the next line when it does not fit within a given area (e.g., a label or a text box). This ensures that the text is displayed across multiple lines without overflowing horizontally. TclProLabel
ItemSpace proLV1.clProSettings.ItemSpace = 10; A property that specifies the spacing between items in a list component. TclProListView
ItemHeight proLV1.clProSettings.ItemHeight = 100; A property that specifies the height of items in a list component. TclProListView
ItemWidth proLV1.clProSettings.ItemWidth = 100; A property that specifies the width of items in a list component. TclProListView
ColCount proLV1.clProSettings.ColCount = 2; A property that specifies the number of columns in a list component. TclProListView
ViewType proLV1.clProSettings.ViewType = lvWaterFall;//(lvList, lvIcon, lvWaterFall) A property that specifies the view type of a list component. This property determines how the list will be displayed and is used in the design of list components. TclProListView


Use of:
In the following example, two button objects are created, and several properties of the btn1 object are used. These properties are then transferred to the btn2 object as well.

 var
   Form1:TCLForm;
   Btn1,Btn2 : TClProButton;
 {
   Form1 = TCLForm.Create(Self);
 
   Btn1 = Form1.AddNewProButton(Form1,'Btn1','Buton1 Object');
   Btn1.Align = alMostTop;
   Btn1.Height = 75;
   Btn1.clProSettings.BorderColor = clAlphaColor.clHexToColor('#d6cdcd');
   Btn1.clProSettings.FontColor = clAlphaColor.clDarkorchid;
   Btn1.clProSettings.FontSize = 12;
   Btn1.clProSettings.FontVertAlign = palcenter;//palLeading , palCenter , palTrailing
   Btn1.clProSettings.FontHorzAlign = palLeading;
   Btn1.clProSettings.TextSettings.Font.Style = [fsBold,fsItalic];
   
   Btn1.clProSettings.BackgroundColor = clAlphaColor.clBlanchedalmond;
   Btn1.clProSettings.IsTransparent = False;
   Btn1.clProSettings.IsFill = True; 
   Btn1.clProSettings.IsRound = True;
   Btn1.clProSettings.RoundHeight = 15;
   Btn1.clProSettings.RoundWidth = 15;
   Btn1.clProSettings.BorderWidth = 3;
   
   Btn1.SetclProSettings(Btn1.clProSettings);
   
   Btn2 = Form1.AddNewProButton(Form1,'Btn2','Buton2 Object');
   Btn2.Align = alTop;
   Btn2.Height = 75;
   Btn2.Margins.Top = 5;
   Btn2.SetclProSettings(Btn1.clProSettings);
   Form1.Run;
 }


See Also