From Clomosy Docs

No edit summary
No edit summary
Line 3: Line 3:
</div>
</div>


<span style="color:blue"><b>AComponent</b></span> :  The variable name of the defined component is written. Here you have to write the name of the component you want in it.<br>
<span style="color:blue"><b>AComponent</b></span> :  Specifies the parent of the object to be defined.<br>


<span style="color:blue"><b>xName</b></span> : The name of the defined panel should be written.<br>
<span style="color:blue"><b>xName</b></span> : The name of the defined panel should be written.<br>

Revision as of 13:44, 14 November 2024

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

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

Used to group and manage other components within a specific area on the form, TclProPanel allows developers to allocate a distinct section in the user interface where other components (such as buttons, text boxes, labels, etc.) can be placed. This makes it easier to control the layout and appearance of components on the form.

Feature Use of Definition
TclProPanel ProPanel1 : TclProPanel; A variable belonging to the TclPanel class is created.
AddNewProPanel ProPanel1 = Form1.AddNewProPanel(Form1,'ProPanel1'); A new TclProPanel is added to the form.

In addition to the features of a standard panel, TclProPanel offers new and advanced features, which we will explain in detail below.

clProSettings Properties

  • BorderColor
  • BorderWidth
  • BackgroundColor
  • IsTransparent
  • IsFill
  • IsRound
  • RoundHeight
  • RoundWidth
  • SetupComponent Properties

  • Width
  • Height
  • PositionX
  • PositionY
  • Align
  • BackgroundColor
  • MarginTop
  • MarginBottom
  • MarginRight
  • MarginLeft
  • RoundHeight
  • RoundWidth
  • BorderColor
  • BorderWidth

  • Example

    For clProSettings:

    Var  
      Form1:TclForm;
      ProPanel1 : TclProPanel;
    
    {
      Form1=TclForm.Create(self);
      ProPanel1=Form1.AddNewProPanel(Form1,'ProPanel1');
      ProPanel1.Align = alCenter;
      ProPanel1.Width = 200;
      ProPanel1.Height = 280;
      ProPanel1.clProSettings.BorderColor = clAlphaColor.clHexToColor('#fabd2');
      ProPanel1.clProSettings.RoundHeight = 10;
      ProPanel1.clProSettings.RoundWidth = 10;
      ProPanel1.clProSettings.BorderWidth = 2;
      ProPanel1.clProSettings.IsFill = True; 
      ProPanel1.clProSettings.IsRound = True;
      ProPanel1.SetclProSettings(ProPanel1.clProSettings);
      
      Form1.Run;
    }
    

    For SetupComponent:

    Var  
      Form1:TclForm;
      ProPanel1 : TclProPanel;
    {
      Form1=TclForm.Create(self);
      ProPanel1=Form1.AddNewProPanel(Form1,'ProPanel1');
      
      clComponent.SetupComponent(ProPanel1,'{
      "Align" : "Center",
      "Width":200,
      "Height":280,
      "BorderWidth":2,
      "BorderColor":"#fabd2",
      "RoundHeight":10,
      "RoundWidth":10	
    }');
    

    See Also