• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1923
  • Last Modified:

how to get scrollbar for Tpagecontrol?

Hi experts,

 I am coding with delphi 7(pascal), How can I get scrollbar for pagecontrol?. ie I need scroll bar for each Ttabsheet controls within  this pagecontrol?
0
inampudi1
Asked:
inampudi1
1 Solution
 
SteveBayCommented:
Have you tried placing a TScrollBox on each TabSheet?
0
 
big_one01Commented:
Hi.
First define a variable VertScrollbar in your code as:
   VerticalScrollBar: TScrollbar;

The put following code somewhere so that it runs before your pagecontrol appears:

VerticalScrollBar:=TScrollbar.Create( your tabsheet );
VerticalScrollBar.Kind:=sbVertical;
VerticalScrollBar.Align:=alLeft;
(your tabsheet).InsertControl(VerticalScrollBar);

Same for the Horizontal scroll bar, changing  the Kind property to sbHorizontal
You  should handle the movement of the bar using OnScroll and OnChange.
0
 
inampudi1Author Commented:
I have already place scrollbar, but thing is that on the tab sheet I am adding panels dynamically , after adding I should able to scroll the  TTabsheet . how can  I correlate ?
0
 
Geert GOracle dbaCommented:
put a scrollbox on each tabsheet and place your panels in this scrollbox
you only need to set the range of the scrollbox scrollbars
0
 
inampudi1Author Commented:
Hi
I put the scrollbar now it is working.

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now