From Clomosy Docs

The with & do statement in Clomosy is used to simplify object member access by allowing multiple property or method assignments to be made within a single context block.

This structure is particularly useful when working with complex objects, as it eliminates the need to repeatedly specify the object name.

Statement Description
with ... do Creates a scoped block that allows direct access to the specified object’s members without repeating its reference name.



var
  MyForm : TclForm;
  ProPanelTop: TCLProPanel;
  TitleLabel: TCLProLabel;
{
  MyForm = TclForm.Create(Self);

  ProPanelTop = MyForm.AddNewProPanel(MyForm, 'ProPanelTop');

  with ProPanelTop do
  {
    Align = alMostTop;
    Height = 80;
    clProSettings.BorderColor = clAlphaColor.clHexToColor('#890410');
    clProSettings.RoundHeight = 10;
    clProSettings.RoundWidth = 10;
    clProSettings.BorderWidth = 2;
    clProSettings.IsFill = True;
    clProSettings.IsRound = True;
    SetclProSettings(clProSettings);

    TitleLabel = MyForm.AddNewProLabel(ProPanelTop, 'TitleLabel', 'Welcome to Clomosy!');
    with TitleLabel do
    {
      Align = alCenter;
      Width = 200;
      clProSettings.FontSize = 16;
      clProSettings.TextSettings.Font.Style = [fsBold];
      SetclProSettings(clProSettings);

    }
  }
  MyForm.Run;
}