From Clomosy Docs

No edit summary
No edit summary
Line 18: Line 18:
* BorderWidth
* BorderWidth


'''Code:'''<br>
'''Example:'''<br>
:'''Base Syntax'''
  '''Var'''   
  '''Var'''   
   MyForm:TclForm;
   MyForm:TclForm;
Line 29: Line 30:
   MyForm.Run;
   MyForm.Run;
  '''end;'''
  '''end;'''
:'''TRObject Syntax'''
  Var 
  MyForm:TclForm;
  testPanel : TclProPanel;
 
  {
    MyForm=TclForm.Create(self);
    testPanel=MyForm.AddNewProPanel(MyForm,'testPanel');
    clComponent.SetupComponent(testPanel,'{"Align" : "Center","MarginBottom":135,"Width" :200,
    "Height":280,"RoundHeight":10,"RoundWidth":10,"BorderColor":"#fabd2","BorderWidth":2}');
 
    MyForm.Run;
  }

Revision as of 11:46, 12 February 2024

AddNewProPanel(TComponent, xName): TclProPanel

The TclProPanel feature is a component that contains components that we use more than once in our application. You can define the component with the json structure. It has the features described below.

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

Example:

Base Syntax
Var  
 MyForm:TclForm;
 testPanel : TclProPanel;
begin MyForm:=TclForm.Create(self); testPanel:=MyForm.AddNewProPanel(MyForm,'testPanel'); clComponent.SetupComponent(testPanel,'{"Align" : "Center","MarginBottom":135,"Width" :200, "Height":280,"RoundHeight":10,"RoundWidth":10,"BorderColor":"#fabd2","BorderWidth":2}');
MyForm.Run; end;
TRObject Syntax
 Var  
  MyForm:TclForm;
  testPanel : TclProPanel;
 
  {
   MyForm=TclForm.Create(self);
   testPanel=MyForm.AddNewProPanel(MyForm,'testPanel');
   clComponent.SetupComponent(testPanel,'{"Align" : "Center","MarginBottom":135,"Width" :200, 
   "Height":280,"RoundHeight":10,"RoundWidth":10,"BorderColor":"#fabd2","BorderWidth":2}');
 
   MyForm.Run;
 }