From Clomosy Docs

Revision as of 08:43, 13 November 2024 by ClomosyManager (talk | contribs)

AComponent : Specifies the parent of the object to be defined.

xName : The name of the defined listview should be written.

Used on the ListView object, this represents items created within the list. A single item is created, within which a specified number of objects can be added.






How do we use these parameters?
When you want to add an object to the TclProListViewDesignerPanel component, the AddPanelObject property is used. The first parameter of this property is the name of the object to be added, and the second parameter specifies the field where the object will be added.
For example, there is a TclEdit object. This object is a text component. One of the fields starting with clText mentioned above can be used for this. Below, an addition has been made to the clText field.

DesignerPanel1.AddPanelObject(Label1,clText);

Let's define it to use in our project.

DesignerPanel1 : TClProListViewDesignerPanel;

To learn the purpose and usage of the SetupComponent and clProSettings properties, please refer to the page.

The SetDesignerPanel property is used to add the DesignerPanel to the ProListView.

ListView1.SetDesignerPanel(DesignerPanel1);

Then, we'll assign properties to our panel using both the SetupComponent structure and clProSettings.

For clProSettings:
   DesignerPanel1 = Form1.AddNewProButton(ListView1,'DesignerPanel1');
   DesignerPanel1.Align = alMostTop;
   DesignerPanel1.Height = 100;
   DesignerPanel1.clProSettings.BorderColor = clAlphaColor.clHexToColor('#F5BCC9');
   DesignerPanel1.clProSettings.BackgroundColor = clAlphaColor.clHexToColor('#F6EDDB');
   DesignerPanel1.clProSettings.IsTransparent = False;
   DesignerPanel1.clProSettings.IsFill = True; 
   DesignerPanel1.clProSettings.IsRound = True;
   DesignerPanel1.clProSettings.RoundHeight = 20;
   DesignerPanel1.clProSettings.RoundWidth = 20;
   DesignerPanel1.clProSettings.BorderWidth = 2;
   DesignerPanel1.SetclProSettings(DesignerPanel1.clProSettings);
   ListView1.SetDesignerPanel(DesignerPanel1);
For SetupComponent:
DesignerPanel1 = MyForm.AddNewProListViewDesignerPanel(ListView1,'DesignerPanel1');
clComponent.SetupComponent(DesignerPanel1,'{"Align":"MostTop","Height":100,"Width" : 150,"BackgroundColor":"#F6EDDB",
"BorderColor":"#F5BCC9","BorderWidth":2,"RoundHeight":20,"RoundWidth":20}');
ListView1.SetDesignerPanel(DesignerPanel1);


In this way, we have made our definitions. You can see the sample project in the TClProListView page.