473,626 Members | 3,240 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Force panel with scrollbars to a certain position

I have a custom image that I draw to a picture box. The image is too big to
view, so I put the picture box within a panel, so that I can scroll around
the image, so far so good.
I would like to see the centre of my picture by default, however I cannot
seem to get access to the scrollbars controls to force them to a default
position?
How do I force the panel to scroll to a defined position in code?

Thanks
Ray
Nov 16 '05 #1
0 1455

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

Similar topics

3
4082
by: Raymond Dynowski | last post by:
How do you force a panel to scroll in code. I have a large picture box inside my panel. I would like the panel to default to the centre of the screen, rather than the scrollbars showing the top left corner Thanks Ray
2
6013
by: Sascha Schmidt | last post by:
Hello ! I'm trying to combine an external (not part of the panel) vertical scrollbar (VScrollBar) with a panel in order to scroll the content of the panel vertically using the external VScrollbar. I can't set the "AutoScroll"-property to true and then use the generated scrollbars inside the panel, because i have to use this external scrollbar which is a modified/customized scrollbar, and doesn't look like a standard scrollbar.
5
22284
by: Rob T | last post by:
To keep my example simple, let's say I have a windows application form with a panel in it. For this example, I want to draw a single line in the panel, which is larger than the size of the panel. Is there a way to get the scrollbars to show up? Also....If I were to put a control (like a button) into the panel, the scrollbars are there...but my line doesn't redraw properly. How should I be doing this? Thanks.
2
1926
by: tjfdownsouth | last post by:
I am using a panel inside an asp.net 2.0 page so that I can have the scrolling capabilities. Inside the panel I have a datagrid that I would like to stay within a certain area. On the initial page load the panel works as expected but when I load the datagrid the panel expands off the side of the page to accomidate the new grid size. Does anyone know how to prevent this without using an absolute size. The panel basically takes up the...
0
2891
by: eweaver | last post by:
Hello, I have a problem with getting an autoscrollbar to end up where I want it. Things to know about the prob: I have an imagebox inside of a Panel for (inheritance of) autoscroll capabilities. The imagebox is named panel2 for my own conventions and the panel will be named panel1 Panel2 (the imagebox) is set to fit to the size of Panel1 (the Panel). All of this works great... I have broken up an extremely large image (width wise, not mem...
9
4268
by: she_prog | last post by:
Dear All, I need to save the content of a panel to a bitmap. The panel can have many child controls which also need to be saved. The problem would be solved if I could have the panel saved to a Graphics object, which is the same as if I'd need to print it. It'd be easy using Control.DrawToBitmap, but I also need the invisible part of the panel (which is hidden because of scrolling) and DrawToBitmap just takes a screenshot.
2
9437
by: ATR2000 | last post by:
I have setup a Panel to have a width of 100% so that it will adjust to users screensize. Within the panel I have a table. Unfortunately the table holds a lot of data and exceeds the size of the screen. The panel has a height of 350px and the scrollbar is set to auto so that both scrollbars appear when needed. What is happening is that due to the table exceeding the width of the screen the panel is also enlarging its width larger than...
5
4719
by: kulabhishek | last post by:
Hi all, I am using panel with autoscroll = true in C# I have added dataGridView control inside panel. When the height and width of dataGridView increases and becomes more than panel size, scrollbars of panel are enabled. When i scroll using any scrollbar and click on the dataGridView which is inside panel, the position of the scrolled scrollbar changes automatically and scrollbars goes to start position.
2
4276
by: kulabhishek | last post by:
Hello all. I have developed one user control "Grid" in C# and I am using it in another user control inside one panel. The AutoScroll property for the panel is enabled. When the height or width of "Grid" increases and becomes more than panel size, scrollbars of panel are enabled. When I scroll using any scrollbar and click on the "Grid" which is inside panel, the position of the scrolled scrollbar changes automatically and...
0
8269
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8711
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8642
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8512
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7203
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4094
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4206
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2630
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1815
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.