From Clomosy Docs

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

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

AddNewFramedScrollBox (TClFramedScrollBox) creates scrollable areas within a framed and styled container. It functions similarly to a standard scroll box but includes additional visual framing and design enhancements, making it suitable for organized and visually distinct content sections. Applications can use TclFramedScrollBox to display scrollable information while maintaining a clean, bordered layout that separates it from other interface elements.

Feature Use of Definition
TclFramedScrollBox FramedScrollBox1: TclFramedScrollBox; A variable belonging to the TclFramedScrollBox class is created.
AddNewFramedScrollBox FramedScrollBox1 = Form1.AddNewFramedScrollBox(Form1,'FramedScrollBox1'); A new TclFramedScrollBox is added to the form.
ScrollBy(DeltaX,DeltaY: Integer); FramedScrollBox1.ScrollBy(0,-100); To scroll the contents within the control, call ScrollBy.

The DeltaX parameter is the change in pixels along the X-axis.
A positive DeltaX value scrolls the content to the left; a negative value scrolls the content to the right.
The DeltaY parameter is the change in pixels along the Y-axis.
A positive DeltaY value scrolls the content upward; a negative value scrolls the content downward.

ScrollTo(X,Y: Integer); FramedScrollBox1.ScrollTo(0,-100); To scroll the contents within the control, call ScrollTo.

The X parameter is the change in pixels along the X-axis.
A positive X value scrolls the content to the left; a negative value scrolls the content to the right.
The Y parameter is the change in pixels along the Y-axis.
A positive Y value scrolls the content upward; a negative value scrolls the content downward.

Width FramedScrollBox1.Width = 150; Allows adjusting the width of the scrollBox.
Height FramedScrollBox1.Height = 50; Allows adjusting the height of the scrollBox.
Align FramedScrollBox1.Align = alTop; With the Align parameter, you can specify where you want our component to be aligned in the form. This parameter has multiple positioning properties. See the page to learn about these features.
Margins FramedScrollBox1.Margins.Left = 50; // Right, Top, Bottom With the Margins parameter, you can give margins at any scale from the right, left, bottom, top.


Example

var   
 MyForm:TclForm;
 FramedScrollBox:TClFramedScrollBox;
 ScrollButton : TclButton;
 I:integer;
 testLabel,testLabel2 : TclLabel;
 
 
 void ScrollDown{
   FramedScrollBox.ScrollBy(0,-150);
 }
 
 {
   MyForm=TclForm.Create(self);
    
   FramedScrollBox = MyForm.AddNewFramedScrollBox(MyForm,'FramedScrollBox');
   FramedScrollBox.Align = alTop;
   FramedScrollBox.Width = 225;
   FramedScrollBox.Height = 250;
   
   testLabel= MyForm.AddNewLabel(FramedScrollBox,'testLabel','Hi ClomosyUser');
   testLabel.StyledSettings = ssFamily;
   testLabel.TextSettings.Font.Size=40;
   testLabel.Align = alTop;
   testLabel.Margins.Left= 50;
   testLabel.Margins.Top= 10; 
   testLabel.Height = 100;
   testLabel.Width = 400;
   
   testLabel2= MyForm.AddNewLabel(FramedScrollBox,'testLabel2','You scrolled here');
   testLabel2.StyledSettings = ssFamily;
   testLabel2.TextSettings.Font.Size=40;
   testLabel2.Align = alTop;
   testLabel2.Margins.Left= 50;
   testLabel2.Margins.Top= 150; 
   testLabel2.Height = 100;
   testLabel2.Width = 400;

   
   ScrollButton = MyForm.AddNewButton(MyForm,'ScrollButton','Scroll!');
   ScrollButton.Align = alTop;
   ScrollButton.Margins.Top = 20;
   ScrollButton.OnClick ='ScrollDown';

   MyForm.Run;
 }


Output:
thumb

See Also