473,566 Members | 3,342 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

user control scroll

Hi,

I am writing a hex edit control from a UserControl. I use drawtext
method of the graphics object in the OnPaint. When the text which I
draw go out of the visible rectangle of the control I want to create
scrollbars but they don't appear - I set autoscroll to true and
autoscrollmargi n to (5,5).
If I add a button or other controls the scrollbars are working.

What can I do and what is my mistake?

Thanks.

Dec 2 '05 #1
1 6264
edi,

Yes, this is the way how the build-in scrolling works in windows forms. The
control is a container and it scrolls its content (the controls it contains)
e.g. If a child control doesn't fit the scrolling area it shows up scroll
bars, so one can scroll to see all the controls.

The idea of implementing scrolling in windows forms is to add a child
control (e.g. panel ) to the scrollable control and use this panel as a
drawing canvas. When you need more space just resize the panel and the
container will adjust the scroll bars accordingly.

If you want to implement the type of scrolling you are after you need to use
scrollbar controls and implement your own logic of invalidation and redraw.

I also sometime miss the old Win32 scolling API.
HTH
Stoitcho Goutsev (100) [C# MVP]

"edi sol" <es********@gma il.com> wrote in message
news:11******** **************@ g47g2000cwa.goo glegroups.com.. .
Hi,

I am writing a hex edit control from a UserControl. I use drawtext
method of the graphics object in the OnPaint. When the text which I
draw go out of the visible rectangle of the control I want to create
scrollbars but they don't appear - I set autoscroll to true and
autoscrollmargi n to (5,5).
If I add a button or other controls the scrollbars are working.

What can I do and what is my mistake?

Thanks.

Dec 2 '05 #2

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

Similar topics

12
12705
by: Arlie Rahn | last post by:
I would like to ad a custom scroll bar control to my app that has a customizable and "flat" look to it (not the normal VB look). Does anyone have any ideas on where to find a good one?
1
7640
by: Raj | last post by:
Hi, I would like to have my user control to support scrollbars. So that when the user control is embeded in a pane/view, and the view size is reduced to less than the size of the usercontrol, the user control must show scroll bars. Currently I tried by setting the AutoScroll property to true. Also, I handled the 'Form1_SizeChanged'...
6
11274
by: martin | last post by:
Hi, I am a web page and a web user control. My web user control is placed in my web page using the following directive <%@ Register TagPrefix="uc1" TagName="Header" Src="WebControls/Header.ascx" %> The web user control contains the following server controls
2
1866
by: Mark | last post by:
I have basically a 2 part question: 1) is there a way to have a listview that can scroll, but hide the scrollbars. I know that sounds odd, but this is a touch screen app and there are "scroll buttons (just command buttons with graphic)" that go to the next/previous item in the list and that allows the scrolling. I know they can drag the...
0
1308
by: WhiteWizard | last post by:
Here’s the situation: I am writing a C# Windows application using VS 2003. I have built a user control, and it has a Tab Control on it with (currently) 2 tab pages, and the whole thing sits on a panel (for resizing with a splitter etc). Each of the tab pages is marked AutoScroll = true. When I load the application I load a tree-view...
2
2111
by: MrNobody | last post by:
IF I am making a custom user control which draws stuff that might exceed its boundaries, can I get the user control to handle the scrolling for me? The AutoScroll property doesn't seem to be doing it. Do I have to set some special Size so it knows it's supposed to scroll? Currently by default behavior it is just clipping my content and not...
5
1730
by: MLH | last post by:
I have a vehicle entry form with a combo box for choosing the owner. Let's say the user opens the list by clicking the arrow then choose the owner by clicking a name. That much works fine. But the problem begins here... If for some reason, the user is uncertain of his first choice of an owner and decides to drop the list down again, using...
0
1246
by: alwayssmiling | last post by:
Hi, In my application, In the main form tab control is there. For this im adding a tabpage which contains a user control, this usercontrol contains many windows controls and other userdefined controls. In this Usercontrol a panel is there, which is a parent control for all reamaining controls. In this panel, a splitter control is there, in...
3
2513
by: =?Utf-8?B?Qw==?= | last post by:
Hi, I have a user control which I use on all my pages. The control is situated on the top of my page (sits on my master page). For some long pages the user has to scroll back up to the top of the page to select an option from my user control. Can I make this user control floatable so that as the user scrolls down the page the user...
0
7584
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...
1
7645
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...
0
7953
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...
0
6263
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5485
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...
0
5213
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...
0
3643
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...
1
1202
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
926
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.