Monday, October 27, 2008

Event Handlers

What I have been think of as "events" are not really events but event handlers.

For example the SelectedIndexChanged handler which is part of a Windows system combo box. This is an event handler which when it is created has a routine associated with it.

It seems like the process is to define the handler at a low level and than have a routine associated with that handler at a higher level. I don't really see the events. I see the handlers.

There seems to be nothing special about the routines that are associated with the handlers, other than that they seem to be private.

Thursday, October 23, 2008

Default Scope of Methods

I am having some trouble finding what the scope of a method is when there is no access modifiers.

What is the default access modifier when nothing is given?

Finally I found it: http://www.danielsoper.com/programming/getresource.aspx?ID=49

The default access modifier type if none is given is private. This makes sense.

Friday, October 10, 2008

Stuck in Tab Order Misery : Resolved

The problems what that I was using a window that was a subclass of another window.

When I went directly to the base it was no problem to edit it.

Stuck in Tab Order Misery

I am unable to set the tab order in the dialog or tab pane.

When I open it in the editor it just says that they are read only.

Trying to do it in control with this code.

Control[] ctrl = this.Controls.Find("controlName",true);
ctrl[0].Focus();
ctrl[0].TabIndex = 0;

This makes it change but it is still ignoring setting of some elements.

The focus is just set for the first element.

This link seems to indicate that the problem has to do with Visual Inheritance.

http://www.devnewsgroups.net/group/microsoft.public.dotnet.framework.windowsforms/topic21172.aspx

Since this is a tab page within another dialog, this seems to make sense.

The steps I took to get the visual editing to work:
  1. rebuilt entire solution
  2. Uninstalled and reinstalled each project
  3. Made sure that all files were writable.
Nothing work.

It look like I might need to set the read at the top level.