.Net Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming Languages - More.Net Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old February 16th, 2012, 04:14 AM
CallMeAndy CallMeAndy is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2005
Posts: 29 CallMeAndy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 6 h 5 m 10 sec
Reputation Power: 0
Scrollbars c#

Hi folks.

I have a panel with scrollbars containing an image 8000 pixels wide. Setting max to 8000 does not allow me to scroll to the right hand edge - basically it stops short. I have read that the HorizontalScroll max should be set to Size of the image plus largeChange but when I do this
Code:
            // LargeChange is typically one page.
            int largeChangeHorizontal = panelMainMapScroller.Width;

            int maxHorizontal = panelMainMap.Width + largeChangeHorizontal;

            // SmallChange it typically 1%.
            int smallChangeHorizontal = Math.Max((int)(maxHorizontal / 100), 1);

            panelMainMapScroller.HorizontalScroll.Minimum = 0;
            panelMainMapScroller.HorizontalScroll.Maximum = maxHorizontal;


Maximum is not increased and still set at = 7999

Is there a criteria for allowing maximum to be reset?

Reply With Quote
  #2  
Old February 16th, 2012, 06:07 AM
CallMeAndy CallMeAndy is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2005
Posts: 29 CallMeAndy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 6 h 5 m 10 sec
Reputation Power: 0
Actually this was a red herring - I have not been able to scroll to the limit of the image because the image was being truncated.

Code:
panelMainMap.Width = bitmapMainMap.Width;


This line caused the problem I thought I needed to resize the inner panel to accomodate the graphic prior to painting but commenting this out in fact corrects things.

Confused from Notts!

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - More.Net Development > Scrollbars c#

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap