Tabindex not working with TableLayoutPanel

Jun 7 2007 2:28 AM
Hello all, I've been having some problems with tabindex when using any type of divider (splitcontainer, tablelayoutpanel, etc.) in VS.NET 2005. I've tried changing the code manually, in the designer, and through the properties window to no avail. Basically I'm using the TableLayoutPanel to organize everything for resizing, but it seems to be causing two problems. I read a few other posts and have made sure all controls, with the exception of the controls I want to tab through, have a tabindex of 999 and a tabstop of false. However, I still get some really odd behavior. The application will go to the first three controls (in one container/panel) properly and then jump down to the Okay button. Here's a screenshot if it'll help: http://i199.photobucket.com/albums/aa15/panuvin/frmDatabase.gif The second problem I'm having is with a foreach loop through all of the controls on the page. What I want to do is to disable all the textboxes, checkboxes, and comboboxes. I have a very simple function, but when ran, it only shows a SplitContainer. There must be a connection between these two problems. Here's the code: [code] public void fnEnableButtonsNextPreviousLastFirst(bool flag) { string str; foreach(Control ctrl in this.Controls) { str = Convert.ToString(ctrl.GetType()); if(str == "System.Windows.Forms.Button") ctrl.Enabled = flag; } [/code] Any help would be greatly appreciated! Panuvin