473,851 Members | 2,287 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 2449
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
4725
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
2411
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
2385
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
2636
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
2693
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
8900
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
1536
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
1783
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
1747
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
9895
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9744
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
11011
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10670
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...
1
10725
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10352
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7900
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
7072
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
5735
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...

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.