Scrollbar - Second Try

  • Thread starter Thread starter Neelima Godugu
  • Start date Start date
N

Neelima Godugu

Hi All,
I am trying to implement custom scrollbars in dotnet(using C#). I am half
way through but not quiet their yet. I think I am not able to nail down the
formula for calculating the scroll width(the scrolling part). I am hoping
somebody can point me in the right direction.
Another option is to extend HSCroll and VScrollbar classes in the CF Library
to add colors to them. I was not able to find any API even to do that. Any
help in this aspect will also be appreciated.
Thanks in advance
Neelima
 
I'm afraid extending existing scrollbar classes is out of question.
As for calculating scroll bar width, I'm not sure what exactly you are
asking, but if you need to scroll a panel of width A in a window of width B,
then the scrollbar range should be A-B. On scrollbar value change set the
panel.Location.X to the scrollbar value
 
Hi Alex,
Thanks for your reply. I have decided to build custom drawn scrollbar. The
problem I have is How do I determine the width of the scroll thumb (Slider).
The formula's I have come up with are not working.
Thanks
Neelima
 
Hi Neelima,

There is a quickstart tutorial that explains how to write a scrollable form
- purhaps you can get your formula from there.
http://samples.gotdotnet.com/quickstart/CompactFramework/doc/scrolling.aspx

As for colors, we don't currently support changing the color of scrollbars.
You could, however, write a custom control that did this. There are a few
quickstarts involving custom controls, but here's a quickstart for a custom
control button:
http://samples.gotdotnet.com/quickstart/CompactFramework/doc/picturebutton.a
spx

Hope that helps,
-Katie

--------------------
| From: "Neelima Godugu" <[email protected]>
| Subject: Scrollbar - Second Try
| Date: Wed, 3 Sep 2003 08:13:49 -0500
| Lines: 13
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| Message-ID: <[email protected]>
| Newsgroups: microsoft.public.dotnet.framework.compactframework
| NNTP-Posting-Host: 64.45.165.82.cypresscom.net 64.45.165.82
| Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!tk2msftngp13.phx.gbl
| Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.framework.compactframework:32645
| X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework
|
| Hi All,
| I am trying to implement custom scrollbars in dotnet(using C#). I am half
| way through but not quiet their yet. I think I am not able to nail down
the
| formula for calculating the scroll width(the scrolling part). I am hoping
| somebody can point me in the right direction.
| Another option is to extend HSCroll and VScrollbar classes in the CF
Library
| to add colors to them. I was not able to find any API even to do that. Any
| help in this aspect will also be appreciated.
| Thanks in advance
| Neelima
|
|
|
|

This posting is provided "AS IS" with no warranties, and confers no rights.
 
Back
Top