473,781 Members | 2,718 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

StackOverflow Exception... working with scrollbars

Hi all.
I build a new class for DataGrid control adding an handler to always show
a Vertical ScrollBar in the grid. The code is below.

----------------------------------------------
Public Class MyDataGrid
Inherits DataGrid

Private _imgList As ImageList
Public Event CurrentRowChang ed()
Private oldSelectedRow As Integer = -1

Public Sub New()
AddHandler MyBase.VertScro llBar.VisibleCh anged, AddressOf ShowScrollBars
MyBase.VertScro llBar.Visible = True
End Sub 'New

Private Sub ShowScrollBars( ByVal sender As Object, ByVal e As EventArgs)
If Not MyBase.VertScro llBar.Visible Then
Dim width As Integer = MyBase.VertScro llBar.Width
MyBase.VertScro llBar.Location = New
Point(MyBase.Cl ientRectangle.W idth - width - 2, 2)
MyBase.VertScro llBar.Size = New Size(width,
MyBase.ClientRe ctangle.Height - 4)
MyBase.VertScro llBar.Show() [****]
End If
End Sub

end class
----------------------------------------------------

It runs well: adding new rows to the grid (programmatical ly) updates/resizes
the VScrollBar automatically
showing the VScrollBar since the beginning, even if there are a few rows in
the grid. Adding new rows,
simply updates the VScrollBar (through the Sub above) and all it's OK.

The problem is when I put the datagrid on a TabPage and I click for creating
new rows staying on the
2nd TabPage: this operation causes a StackOverflowEx ception while executing
the line [****].

Uhmm... I don't know absolutely what's the real problem. Can anyone help me?

Many thanks
Francesco
Nov 20 '05 #1
0 1069

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

Similar topics

6
11488
by: adrien | last post by:
Hi, (also posted in netscape.public.mozilla.browser) i use netscape 7 and want to hide the scrollbars of the window when something happens. I tried this: window.scrollbars.visible=false window.scrollbars.visibility="no" .... nothing works Is it also possible only to hide the vertical scrollbar instead of both?
24
4729
by: Nobody | last post by:
Okay, you are all so smart in here. Answer me this: IE6 in standards mode doesn't seem to hide scrollbars on the body element (overflow:hide) Ain't this a quandary. I have it in my head that I need to specify html instead. The scrollbars do hide on Gecko browsers though, so there is definitely a disagreement among browser developers on how to implement scrollbars (as a side note, Gecko browsers with their notoriously bug-ridden...
6
2504
by: Babu Mannaravalappil | last post by:
Can somebody please help me figure out why the following method exceptions out? Execution at the line marked with ********** hangs for about 15 seconds and then I get an error that says an Unhandled StackOverFlowException occurred. The execution does not even get passed to the catch block. At the time of my test, only one of 12 tables in the dataset (catalogsDS) really has changes. The dataset is not a huge one. Most tables have less...
1
1905
by: TDOR | last post by:
I have started a nt service project in VS2003, added a timer from the toolbox, and set the timer to trigger every 20 secs. The method that the timer calls has among others these lines: ArrayList x = new ArrayList(); for (...) { x.add(new someobject(...)); }
4
5021
by: 6tc1 | last post by:
Hi all, I have just finished debugging a windows application and have solved the problem - however, I want to be sure that I understand the problem before I move on. Before I detail the problem, this problem requires some understanding of threading concepts. Basically, the class contained both a PictureBox object as well as a corresponding Image object (they both had a copy of the same picture). The following was used to access the...
6
3569
by: sjoerd van den Nieuwenhof | last post by:
hello, i'm getting a error named: an unhandled exception of type 'system.stackoverflowException' occured in unknow module. whta does this mean?? please help me
23
2571
by: Rob Meade | last post by:
Hi all, I think I may have created a bit of a problem earlier with some of my classes.... I *think* that I may have inherited a class that was inheriting that class - endless loop kinda scenario....although this wasn't built out of no where VS pops this error up - whats more frustrating is that it does it now every time i open the project in VS, its gives me an option to debug - yes, to debug the deveng!!!! I'm not quite that...
5
4915
by: Gene Ariani | last post by:
Is there a limit to how big a rowfilter on dataview could be? my rowfilter is dynamically generated and if its get too big I get a stackoverflow error other wise it works fine. Any direction is appreciated it.
2
2474
by: tpaulson | last post by:
I have a couple of DIV's that I hide/display based on radio buttons. On the DIV's, I have multiple drop down boxes. The source shows that they are populated, but I can't make them drop down. Only click on the Unplatted Radio button, the rest isn't functional, yet. Any ideas how to make these drop down in FF. This works in IE. Here is the code: <HTML> <HEAD> <TITLE>Door County Register of Deeds - Tract Inquiry</TITLE>
2
1716
by: wansch | last post by:
Hello, Iam quite new to programming and dont know enough about the stack. My problem is if I call a recurcive function like in the code TestCalc(100000), I get at some integer argument size a stack overflow exception. The recursion is not endless. But at 1000000 the exception is thrown. What is limitation of the stack or how can I figure it out. Are there restrictions about function calls?
0
9639
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
9474
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10076
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
9939
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
8964
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...
1
7486
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5375
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
5507
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2870
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.