From Clomosy Docs
No edit summary |
No edit summary |
||
| Line 26: | Line 26: | ||
DesignerPanel1 : TClProListViewDesignerPanel; | DesignerPanel1 : TClProListViewDesignerPanel; | ||
<blockquote style="background-color:#CBEDD5">To learn the purpose and usage of the '''SetupComponent''' and '''clProSettings''' properties, please refer to [[ | <blockquote style="background-color:#CBEDD5">To learn the purpose and usage of the '''SetupComponent''' and '''clProSettings''' properties, please refer to [[Pro Object Properties| the page]]. </blockquote> | ||
The SetDesignerPanel property is used to add the DesignerPanel to the ProListView.<br> | The SetDesignerPanel property is used to add the DesignerPanel to the ProListView.<br> | ||
Revision as of 14:52, 11 November 2024
AddNewProListViewDesignerPanel(TComponent, xName):TClProListViewDesignerPanel;
It is a component that can be defined in Listview and that we can add elements to and design. We can add a certain amount of elements in the DesignerPanel.
The binding parameters of these elements to be added are as follows:
- clCaption
- clText
- clText1
- clText2
- clText3
- clText4
- clText5
- clText6
- clImage1
- clImage2
- clRecord_GUID
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.