473,324 Members | 2,166 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

AutoScroll in a UserControl

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
Nov 20 '05 #1
0 921

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: BestNews | last post by:
OS: XP ..Net= framework = 1.0.3705 VS.Net IDE = 7.0.9466 1. I used an ActiveX control in C# client Application. After executing Aximp of ActiveX control. I derived a class from the AxHost.
0
by: TF | last post by:
Hi, I am writing a User Control (inherited by class UserControl) for a Windows .Net application. The 'AutoScroll' property is set to 'true'. Now I want to scroll the view to a point on the client...
0
by: Thorbjørn Jørgensen | last post by:
Hi I have a UserControl where I need to control the scrolling when the mouse get neer to the edges of the control. On the UserControl AutoScroll is activated and it works, but I can not control...
0
by: linkspeed2000 | last post by:
Hi, All: When using AutoScroll feature, the UserControl moves the unchanged part and only paints the changed part. This only works under following situations: 1. when OnPaint() function always...
0
by: active | last post by:
I have a usercontrol containing a picturebox. Autoscroll is set to true and AutoScrollMinsize is also set (to the size of the Picturebox) When I resize the form (Usercontrol is Docked=fill on...
1
by: Workgroups | last post by:
Not having much luck tracking this down... I'm working with a form, Form1, which contains a panel called pnlParent. Both Form1 and pnlParent have AutoScroll = False. pnlParent contains a panel...
21
by: Sharon | last post by:
I have added an auto scroll feature to my DataGrid control like this: private void DoAutoScroll() { DataView dv = m_DataGrid.DataSource as DataView; DataGridCell cell = m_DataGrid.CurrentCell;...
3
by: Tom Bianchi | last post by:
Hi, I have a Panel with the AutoScroll property set to True and many TextBoxes into it, with only some of them positioned in the visible portion of the panel. Is there a Panel event that I can...
0
by: MrNobody | last post by:
Here is a quick sample app I made which illustrates the problem I am having making my own UserControl: how do I get scrollbars to appear if I draw something bigger than the ClientSize ? ...
1
by: =?Utf-8?B?TmV3YnJv?= | last post by:
I have this program running on PDA compact framework in which it will receive paint message from server's networkstream and updates the client's screen by drawing on this custom 'Draw' userControl....
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.