473,387 Members | 1,318 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Change scroller size

Dear all,
imagine this is scroll bar.
Min|-------------|scroller|---------|Max
The position of scroller is set with Value.
How do I change the width of scroller?
Thank you in advance,
Boni
Nov 21 '05 #1
8 2426
the width of the thumb (what you call the scroller) is dynamically set based
on the min and max size. It's not something you want to just change because
its determined automatically what size it should be in windows. You can
change it using API calls but it is a little pointless.

"Boni" <oilia@nospam> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Dear all,
imagine this is scroll bar.
Min|-------------|scroller|---------|Max
The position of scroller is set with Value.
How do I change the width of scroller?
Thank you in advance,
Boni

Nov 21 '05 #2
Hi Brian
on the min and max size. It's not something you want to just change
because its determined automatically what size it should be in windows.

But how is it determinated? In dependency of what?
Thanks,
Boni
Nov 21 '05 #3
"Boni" <oilia@nospam> schrieb:
on the min and max size. It's not something you want to just change
because its determined automatically what size it should be in windows.

But how is it determinated? In dependency of what?


The width of the thumb for horizontal scrollbars depends on the value of the
scrollbar's 'LargeChange' property too. The code below demonstrates how to
approximately calculate the width of the thumb for an horizontal scrollbar.
To test the sample, place a button control and an horizontal scrollbar on
the form and add the code below to the button's 'Click' event. After
pressing the button it will be moved below the scrollbar and its width will
be approximately equal to the scrollbar's thumb's width (note that the code
was written from scratch!):

\\\
Me.Button1.Left = _
Me.HScrollBar1.Left + SystemInformation.HorizontalScrollBarHeight
Me.Button1.Top = _
Me.HScrollBar1.Top + Me.HScrollBar1.Height
Me.Button1.Width = _
CInt( _
Me.HScrollBar1.LargeChange * _
( _
Me.HScrollBar1.Width - 2 * _
SystemInformation.HorizontalScrollBarHeight _
) / 100 _
)
///

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #4
Hi Herfried,
thank you very much.
Just one more question
The width of the thumb for horizontal scrollbars depends on the value of
the scrollbar's 'LargeChange' property too.

This "too" what does it mean. If I understand you correctly it depoends on
Minimum, Maximum and LargeChange property ONLY? Or is there some other
things?
And thanks for your code.
Boni
Nov 21 '05 #5
"Boni" <oilia@nospam> schrieb:
The width of the thumb for horizontal scrollbars depends on the value of
the scrollbar's 'LargeChange' property too.
This "too" what does it mean.


It only means that 'LargeChange' is an additional dependency.
If I understand you correctly it depoends on Minimum, Maximum and
LargeChange property ONLY? Or is there some other things?


It depends on the width of the scrollbar (for horizontal scrollbars) too
;-).

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #6
Now I am really confused:
You give following formula:
TumbWidth= CInt( Me.HScrollBar1.LargeChange * (
Me.HScrollBar1.Width - 2 *
stemInformation.HorizontalScrollBarHeight ) / 100
I need to have formula to LargeChange for given ThumbWidth
LargeChange =TumbWidth*100/( Me.HScrollBar1.Width - 2 *
SystemInformation.HorizontalScrollBarHeight )

Now I want to have Tumb as a 10-th of width and looking for large change:
LargeChange =( (Me.HScrollBar1.Width - 2 *
SystemInformation.HorizontalScrollBarHeight )/10)*100/(
Me.HScrollBar1.Width - 2 *
stemInformation.HorizontalScrollBarHeight )=10. So it does not depend on
Minimum and maximum.
Unfortunately tests shows that my formula is wrong :(.
Did I missed something or is your formula incorrect too?

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> schrieb im Newsbeitrag
news:%2****************@TK2MSFTNGP14.phx.gbl...
"Boni" <oilia@nospam> schrieb:
The width of the thumb for horizontal scrollbars depends on the value of
the scrollbar's 'LargeChange' property too.


This "too" what does it mean.


It only means that 'LargeChange' is an additional dependency.
If I understand you correctly it depoends on Minimum, Maximum and
LargeChange property ONLY? Or is there some other things?


It depends on the width of the scrollbar (for horizontal scrollbars) too
;-).

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #7
"Boni" <oilia@nospam> schrieb:
Now I want to have Tumb as a 10-th of width and looking for large change:
LargeChange =( (Me.HScrollBar1.Width - 2 *
SystemInformation.HorizontalScrollBarHeight )/10)*100/(
Me.HScrollBar1.Width - 2 *
Information.HorizontalScrollBarHeight )=10. So it does not depend on
Minimum and maximum.
Unfortunately tests shows that my formula is wrong :(.
Did I missed something or is your formula incorrect too?


The width of the thumb depends on the difference between the maximum and the
minimum in relation to the large change interval.

\\\
Me.HScrollBar1.LargeChange = _
(Me.HScrollBar1.Maximum - Me.HScrollBar1.Minimum) \ 10
///

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #8
Thank you very much for your time.
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> schrieb im Newsbeitrag
news:uO**************@TK2MSFTNGP11.phx.gbl...
"Boni" <oilia@nospam> schrieb:
Now I want to have Tumb as a 10-th of width and looking for large change:
LargeChange =( (Me.HScrollBar1.Width - 2 *
SystemInformation.HorizontalScrollBarHeight )/10)*100/(
Me.HScrollBar1.Width - 2 *
rmation.HorizontalScrollBarHeight )=10. So it does not depend on
Minimum and maximum.
Unfortunately tests shows that my formula is wrong :(.
Did I missed something or is your formula incorrect too?


The width of the thumb depends on the difference between the maximum and
the minimum in relation to the large change interval.

\\\
Me.HScrollBar1.LargeChange = _
(Me.HScrollBar1.Maximum - Me.HScrollBar1.Minimum) \ 10
///

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Razvan | last post by:
Hello, Can somebody recommend me a Java Script scroller that can scroll an i-frame ? I tried the Tigra scroller (www.softcomplex.com/products/tigra_scroller/) but sometimes it does not...
3
by: Alex D. | last post by:
does any body knows about some horizontal news scrollers that supports relative position or that resizes automatically to fit the whole horizontal space when viewed in different resolutions? ...
8
by: marco | last post by:
Hi ! I have this part of code and i can not find out why the scroller is starting from left to right instead RIGHT to LEFT. This is the main part and the scroller is working fine but from the...
14
by: mistral | last post by:
Below is Typewriter Scroller script. I want adjust is as follows: remove lower dash "_" out; display text not in form, but inside div, without any borders (style="visibility:hidden"). Also I need...
1
by: gezerpunta | last post by:
Hi folks :) We use scriptaculous draggables inside a scrollable div. Everything works fine if we turn on the option "Ghosting" (this enables items to be dragged outside the div with a sroller...
14
by: Mars | last post by:
I'm looking for a javascipt vertical news scroller that will scroll from the bottom of the page to the top showing many new items. Would really appreciate some help. The scroller I'm using at...
9
by: John | last post by:
I need a scroller (java) or whatever that can read a php file and display it in the script. Does anyone know of any? I have searched the script sites but didn't find anything.
1
by: mirroras | last post by:
Hi all !! I have a difficult issue. I use the Manual Scroller script from dynamicDrive. This script is full working and is cross-browser. The url is for it, is...
5
by: devdoer | last post by:
HI: I have a page contain anthoer site's iframe window, but the iframe window ' document is large, so the scroller shows in the iframe window. I decide to caculate the iframe document's true...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.