AutoScroll problem

LOFRANK

Freshman
Joined
Aug 26, 2003
Messages
49
Location
Naples
hi,
i have a panel and i put in this panel some labels by code at run-time.

panel1.autoscroll=true

dim l as new label

l.text="11"

l.autosize=true

l.top=-10

panel1.controls.add(l)



why no scroll?
 
How big is the panel? Is the control you are adding visible within the panel? If it is fully visible then you won't need to scroll to see it; try positioning the label outside of the visible portion of the panel.
 
the label is visible, and in position -10,-10
so i found no scroll bars visible in the panel...

but just for negative positions...
 
You'll also need to set the panel's AutoScrollMinSize along with setting the AutoScroll properity to True.

Visual Basic:
Panel1.AutoScroll = True
Panel1.AutoScrollMinSize = New Size(Panel1.Width, Panel1.Height)

Of course you can set the minumum size to anything you need.

As a note: Is the correct abbreviation for minumum min. (as used for minute) or mim. (as used for minimum)?
 
Back
Top