473,382 Members | 1,717 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,382 software developers and data experts.

How to avoid automatic scrolling on focus?

I have a panel which is located in a AutoScroll-enabled panel. The
problem is when I click in the panel, the contining panel
automatically scrolls to position (0,0).
How can I get around this annoying behaviour?

--
cody

[Freeware, Games and Humor]
www.deutronium.de.vu || www.deutronium.tk
Jul 21 '05 #1
2 1554
have you tried implementing a method that gets invoked when the
control aquires focus, that "moves" the scrolled contained control to
show the clip of it that you desire?

"codymanix" <no****************@gmx.net> wrote in message news:<eJ**************@TK2MSFTNGP09.phx.gbl>...
I have a panel which is located in a AutoScroll-enabled panel. The
problem is when I click in the panel, the contining panel
automatically scrolls to position (0,0).
How can I get around this annoying behaviour?

Jul 21 '05 #2
> have you tried implementing a method that gets invoked when the
control aquires focus, that "moves" the scrolled contained control to
show the clip of it that you desire?
I have a panel which is located in a AutoScroll-enabled panel. The
problem is when I click in the panel, the contining panel
automatically scrolls to position (0,0).
How can I get around this annoying behaviour?


Thank you. But howow can I do this? I tried the following but it didn't
work:

Point lastScrollPos;
protected override void OnGotFocus(EventArgs e)
{
this.Location = lastScrollPos ;
}

protected override void OnEnter(EventArgs e)
{
lastScrollPos = this.Location;
}

--
cody

[Freeware, Games and Humor]
www.deutronium.de.vu || www.deutronium.tk
Jul 21 '05 #3

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

Similar topics

3
by: Scott M | last post by:
Hi, I am currently trying to write a simple game using vb.net the form I am working on is 800*600 (this is set as the maximum size) and autoscroll is set to true. The user moves around the...
1
by: Wesman | last post by:
Threads, textboxes and scrolling Thanks in advance for any information on this matter. I have run into a small richtextbox, scrolling and tread issue. Which has me totally confused. Instead of...
5
by: Bryan Masephol | last post by:
Hi All I got a datagrid and a ComboBox on a form. I populate the combobox with years for all the data avaiable. When the user chooses a year the datagrid is populated with the specific years...
2
by: codymanix | last post by:
I have a panel which is located in a AutoScroll-enabled panel. The problem is when I click in the panel, the contining panel automatically scrolls to position (0,0). How can I get around this...
4
by: Keith Bentrup | last post by:
Hi all, I wrote a simple search function to find text in a textarea where not all the text is visible (ie. the text box displays 10 lines but there may be more than 1000 lines to search). I can...
3
by: Brian Tkatch | last post by:
I have a form with two DataGrids, which are kept in sync manually via Stored PROCEDURE calls. That is, when a record is selected on the first grid, a stored PROCEDURE is CALLed to Fill() the next...
16
by: Richard Maher | last post by:
Hi, I have this Applet-hosted Socket connection to my server and in an ONevent/function I am retrieving all these lovely rows from the server and inserting them into the Select-List. (The on...
7
vikas251074
by: vikas251074 | last post by:
Can I get automatic focus on first text item just after running programme? Because when I run the programme, there is no focus on any text item at the first instant. I have to use mouse to go to...
1
by: jonceramic | last post by:
Hi All, I've noticed that in a lot of my forms and tables, when I'm on continuous view, I can't scroll when the focus is in a field or on a control. Meaning, if I have a list, and start...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
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...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.