1 (edited by prahousefamily 2026-08-21 08:52:37)

Topic: How To Use VertScrollBar And HorzScrollBar Not Show

I Try Code

begin
    Form1.Width  := 3000 ;
    Form1.Height := 3000 ;
    Form1.Button1.Top  := 2900 ;
    Form1.Button1.Left := 2900 ;

    Form1.AutoScroll := True;

    Form1.VertScrollBar.IsScrollBarVisible;
    // Form1.VertScrollBar.ScrollPos  := 100 ;
    Form1.VertScrollBar.ButtonSize := 100 ;
    Form1.VertScrollBar.Position  := 100 ;
    Form1.VertScrollBar.Range := 100;
    Form1.VertScrollBar.Tracking := True;
    Form1.VertScrollBar.Visible := True;

    Form1.HorzScrollBar.IsScrollBarVisible;
    // Form1.HorzScrollBar.ScrollPos  := 100 ;
    Form1.HorzScrollBar.ButtonSize := 100 ;
    Form1.HorzScrollBar.Position  := 100 ;
    Form1.HorzScrollBar.Range := 100;
    Form1.HorzScrollBar.Tracking := True;
    Form1.HorzScrollBar.Visible := True;

end.

Error At 

Form1.VertScrollBar.ScrollPos  := 100 ;

And When Run Compile  Form Not Effect Haven't ScrollBar ???
Or set other properties too?


https://i.ibb.co/Nn9hQ9vW/D20260821-T153848.png



TextMode

+-----------------------------------------------------------------+
| Desktop Screen (Actual Display Area: Width 400 x Height 300)    |
|                                                                 |
|   +---------------------------------------------------------+   |
|   | Form (Width 3000 x Height 3000)                         |   |
|   | [Clipped / Overflowing Screen]                          |   |
|   |                                                         |   |
|   | (Top-Left content is visible...)                        |   |
|   |                                                         |   |
|   |                                                         |   |
|   |                                                         |   |
|   |   +----------------------------+                        |   |
|   |   | Button at Y = 2900 (Hidden)|                        |   |
|   |   +----------------------------+                        |   |
|   +---------------------------------------------------------+   |
|                                                                 |
| ❌ Problem Encountered:                                         |
| - Desktop screen is smaller than the Form (300 < 3000)          |
| - Bottom and right edges of the Form are clipped off-screen     |
| - No Scrollbars (Vertical & Horizontal) appear to scroll        |
+-----------------------------------------------------------------+
My Visual Database : I Love You
Easy For Beginner Student For Me

2 (edited by sparrow 2026-08-21 08:53:30)

Re: How To Use VertScrollBar And HorzScrollBar Not Show

This property of scrollbars (.ScrollPos) in MVD is read-only.

3 (edited by sparrow 2026-08-21 09:21:53)

Re: How To Use VertScrollBar And HorzScrollBar Not Show

Some comments. The same applies to horizontal scrolling.

 //   Form1.VertScrollBar.IsScrollBarVisible;     // -  Returns true if the scroll bar is visible. This usage is inappropriate.
 //    Form1.VertScrollBar.ScrollPos  := 100 ;    // -  Read-only property
 //   Form1.VertScrollBar.ButtonSize := 100 ;     // -  It doesn't work
!!!!!!!!   Form1.VertScrollBar.Position  := 100 ;        !!!!!!!! Works at OnShow event.
!!!!!!!!    Form1.VertScrollBar.Range := 100;               !!!!!!! If the value is set incorrectly, the scroll bar will not appear.
    Form1.VertScrollBar.Tracking := True;
    Form1.VertScrollBar.Visible := True;

.Range property - https://docwiki.embarcadero.com/Librari … lBar.Range



This is enough

    Form1.Width  := 300 ;
    Form1.Height := 300 ;
    Form1.Button1.Top  := 400 ;
    Form1.Button1.Left := 400 ;

    Form1.AutoScroll := True;