Solved

how to get scrollbar  for Tpagecontrol?

Posted on 2008-10-06
5
1,739 Views
Last Modified: 2013-11-23
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
Comment
Question by:inampudi1
5 Comments
 
LVL 14

Expert Comment

by:SteveBay
ID: 22649045
Have you tried placing a TScrollBox on each TabSheet?
0
 
LVL 3

Expert Comment

by:big_one01
ID: 22650920
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
 

Author Comment

by:inampudi1
ID: 22658367
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
 
LVL 37

Accepted Solution

by:
Geert Gruwez earned 500 total points
ID: 22958396
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
 

Author Comment

by:inampudi1
ID: 23244677
Hi
I put the scrollbar now it is working.

0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
My eclipse editor won't start ? 4 144
maven project import to eclipse problems 13 102
FindStr works only with 1 char searches 2 77
eclipse compiler vs Installed JREs option 3 77
In our object-oriented world the class is a minimal unit, a brick for constructing our applications. It is an abstraction and we know well how to use it. In well-designed software we are not usually interested in knowing how objects look in memory. …
Programmer's Notepad is, one of the best free text editing tools available, simply because the developers appear to have second-guessed every weird problem or issue a programmer is likely to run into. One of these problems is selecting and deleti…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now