BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Scroll Bar Style Problem

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Graphics)
View previous topic :: View next topic  
Author Message
srinivas
Guest





PostPosted: Tue Dec 20, 2005 5:15 am    Post subject: Scroll Bar Style Problem Reply with quote




Hi all
In my applciation i am not using the auto scroll bars,
auto scroll property of the form is false
I am using the scroll bar controls(not auto scrollbars) for scrolling

but i am not style of this is different. how to get normal style

like i want big bar when small data is in the window
and when data incresed the bar size has to be decresed
Is there is any property set that i have to set?

thanks
srinivas

Back to top
Hans Galema
Guest





PostPosted: Tue Dec 20, 2005 9:19 am    Post subject: Re: Scroll Bar Style Problem Reply with quote



srinivas wrote:

Quote:
like i want big bar when small data is in the window
and when data incresed the bar size has to be decresed

You mean that the size of the slider compared to the heigth of the
scrollbar reflects the part of the document that is actually visible ?

Quote:
Is there is any property set that i have to set?

Which version of bcb do you use ?

If the following propertise exist then set Max to the size of
the document and PageSize and LargeChange both to
the amount seen.

Hans.

Back to top
srinivas
Guest





PostPosted: Wed Dec 21, 2005 9:07 am    Post subject: Re: Scroll Bar Style Problem Reply with quote




Hans Galema <notused (AT) notused (DOT) nl> wrote:

You mean that the size of the slider compared to the heigth of the
scrollbar reflects the part of the document that is actually visible ?

Quote:
Which version of bcb do you use ?

srinivas wrote

->I am using the Borland c++ builder 6.0 professional edition

->If the lines are more than window i am displaying scrollbar
and when lines are dicresing the slider size has to decrese

but in my case max value i am changing but slider is not
becoming smaller
If i am adding more lines the slider has to decrese

thanks
srinivas

Back to top
Hans Galema
Guest





PostPosted: Wed Dec 21, 2005 12:04 pm    Post subject: Re: Scroll Bar Style Problem Reply with quote

srinivas wrote:

Quote:
->If the lines are more than window i am displaying scrollbar

Yes. Ok. You make the TscrollBar Visible onlt when needed.

Quote:
and when lines are dicresing the slider size has to decrese

Don't understand. When the total amount of lines increases then
the slider has to decrease its size.

Quote:
but in my case max value i am changing but slider is not
becoming smaller

Do you mean Max ? How small should the slider become ? There
is a minimum size.

Quote:
If i am adding more lines the slider has to decrese

Yes. That is normal.

Do you have any questions ?

Hans.

Back to top
srinivas
Guest





PostPosted: Thu Dec 22, 2005 4:37 am    Post subject: Re: Scroll Bar Style Problem Reply with quote


It is sorry to say i am not getting

read this i will explain whole scenario

1)example
There is text document is there it can handle(display) 10 lines
So up to 10 lines scroll bar is disabled
after that if u add the one more line slider is minimised
if u add one more line slider again decreses . it will goes on small

2)What i am doing is
I added one Scrollbar to form
now slicer is fixed size
even though i changed the Max property form 0 to 100 this slider size is not decresing

3) what i want is
If the Max value is 0 slider size is as big as possible
if Max value is 1 Slider size has to decrese
If i changed Max value to 100 the Slider has to become small

This is now not happening when i added the ScrollBar to form



-->> How can I change the Scroll bar's Slider Size?

Thanks a lot
srinivas

Back to top
Hans Galema
Guest





PostPosted: Thu Dec 22, 2005 8:35 am    Post subject: Re: Scroll Bar Style Problem Reply with quote

srinivas wrote:

Quote:
1)example
There is text document is there it can handle(display) 10 lines
So up to 10 lines scroll bar is disabled

You forgot to tell how many lines the document contains.

I already told you before:
Set Max to the number of lines in the document.
Set PageSize and LargeChange to 10.

Quote:
after that if u add the one more line slider is minimised

After adding a line, did you increase Max with 1 like it should ?
Of course the slider will get smaller then.

Quote:
if u add one more line slider again decreses . it will goes on small

Normal behaviour I would say.

Quote:
2)What i am doing is
I added one Scrollbar to form
now slicer is fixed size
even though i changed the Max property form 0 to 100 this slider size is not decresing

Normal as PageSize and LargeChange will be 1. That causes for a minimum size.

Quote:
3) what i want is
If the Max value is 0 slider size is as big as possible

Noncense. If there is no document then the visible part is zero
also.

Quote:
if Max value is 1 Slider size has to decrese

Never. 1 as value for Max is not very handy also.

Quote:
If i changed Max value to 100 the Slider has to become small

And what did it ?

Quote:
-->> How can I change the Scroll bar's Slider Size?

That I already told you twice.

To repeat. Place a TScrollBar on a TForm. (You will see that Max == 100
and PageSize and LargeChange are 1).

Now put two TButtons on the same TForm.

In the OnClickHandler of the first button put:

ScrollBar1->PageSize = 40;
ScrollBar1->LargeChange = ScrollBar1->PageSize;

And for the other:

ScrollBar1->Max = 200;

Try that and see how it works.

If that does not help please show your code.

Hans.

Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Graphics) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.