473,594 Members | 2,747 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2440
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******** ********@TK2MSF TNGP12.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 + SystemInformati on.HorizontalSc rollBarHeight
Me.Button1.Top = _
Me.HScrollBar1. Top + Me.HScrollBar1. Height
Me.Button1.Widt h = _
CInt( _
Me.HScrollBar1. LargeChange * _
( _
Me.HScrollBar1. Width - 2 * _
SystemInformati on.HorizontalSc rollBarHeight _
) / 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 .HorizontalScro llBarHeight ) / 100
I need to have formula to LargeChange for given ThumbWidth
LargeChange =TumbWidth*100/( Me.HScrollBar1. Width - 2 *
SystemInformati on.HorizontalSc rollBarHeight )

Now I want to have Tumb as a 10-th of width and looking for large change:
LargeChange =( (Me.HScrollBar1 .Width - 2 *
SystemInformati on.HorizontalSc rollBarHeight )/10)*100/(
Me.HScrollBar1. Width - 2 *
stemInformation .HorizontalScro llBarHeight )=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******** ********@TK2MSF TNGP14.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 *
SystemInformati on.HorizontalSc rollBarHeight )/10)*100/(
Me.HScrollBar1. Width - 2 *
Information.Hor izontalScrollBa rHeight )=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******** ******@TK2MSFTN GP11.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 *
SystemInformati on.HorizontalSc rollBarHeight )/10)*100/(
Me.HScrollBar1. Width - 2 *
rmation.Horizon talScrollBarHei ght )=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
4710
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 appear at all on my web page (www.mihaiu.name). It doesn't seem to be reliable...
3
2400
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? thanks, alex.
8
2371
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 wrong side. //------------------------------------------ function start(){if(document.getElementById){tdiv6=document.getElementById('slider'); firstns6();}
14
2609
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 control via css font size, color, family. How to adjust this? <script language="javascript" type="text/javascript"> <!-- begin var max=0; function textlist()
1
2675
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 (scroll:auto) properly. Otherwise items could not be dragged outside). When it comes to IE a div with a scroller does not work properly it just have the scroller but the items are not in it.
14
8880
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 the moment only shows one news item at a time, can anyone suggest code I could insert to show many news items? Mars
9
1523
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
1775
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 http://www.dynamicdrive.com/dynamicindex2/manualscroll.htm. I am using a simple example. I have two updatepanels. The first has a linkbutton inside so when I click it, I show some text in the second updatepanel. I want the scroller to contain the text of second updatepanel. All the...
5
1731
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 size and set the iframe 's height and width according the document's true size , how can I do this? by scrollMaxY of the iframe ? Thanks.
0
7880
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8374
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
6665
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
5739
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5413
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3868
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
3903
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2389
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
1217
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.