PC Review


Reply
Thread Tools Rate Thread

AutoScroll in a UserControl

 
 
=?Utf-8?B?WWFyb24=?=
Guest
Posts: n/a
 
      1st Mar 2004
In a UserControl, I know that the control will automatically create scrollbars and a scrolling ability when needed. However, how exactly does it decide how big the control's paintable "region" is? (ie, to decide how big to make the scrollbars, and so on).

Is it simply based on painting everything to the e.Graphics element in the OnPaint procedure, at which point the control will decide how big it currently is, and so how much is off screen

I'm asking because I am making a control very similar to the ListView control in Details view. I'm wondering, if I have 1000 items in this control, of which only, lets say, 10 are visible at a time, would I have to draw the entire 1000 items to e.Graphics in order for the control to know how much to draw?

Or is there any possible way to perhaps tell the control, without drawing, the dimensions

Thanks

Yaron
 
Reply With Quote
 
 
 
Reply

Thread Tools
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Autoscroll oversized userControl in panel Newbro Microsoft C# .NET 1 5th Mar 2008 02:11 AM
Create a usercontrol instances to another usercontrol in code behi =?Utf-8?B?UGFkYW0=?= Microsoft C# .NET 1 9th Apr 2007 11:52 AM
UserControl not putting scrollbars if AutoScroll is true =?Utf-8?B?TXJOb2JvZHk=?= Microsoft C# .NET 0 1st Nov 2006 03:19 PM
Usercontrol derived from Usercontrol - masterpage init is fired tw =?Utf-8?B?Q2FwdGFpbiBTZW5zaWJsZQ==?= Microsoft ASP .NET 0 3rd Feb 2006 03:39 PM
UserControl Autoscroll - Uncontrollable Scrolling. brian Microsoft Dot NET Framework Forms 2 19th Dec 2003 05:05 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:53 AM.