Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > C# and C > C# 1.0 > C#
Password Reminder
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
C# Programming questions specific to the Microsoft C# language. See also the forum Beginning Visual C# to discuss that specific Wrox book and code.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old June 7th, 2007, 01:30 AM
Authorized User
Join Date: Sep 2005
Location: , , .
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Default Tabindex not working with TableLayoutPanel

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:

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:

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;
Any help would be greatly appreciated!


Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
DataGrid left to right tabindex koco Classic ASP Databases 0 July 16th, 2008 04:48 AM
set tabindex for controls in two sync grids toshi C# 0 September 27th, 2007 03:59 AM
how to set tabindex in gridview(Button column) amolchikurte ASP.NET 2.0 Professional 2 May 29th, 2007 11:54 PM
set the Tabindex Of ASP.net controls on MAC machin sudhirikke ASP.NET 2.0 Basics 0 May 17th, 2006 10:04 AM
Setting tabindex in control array pritz VB How-To 1 March 21st, 2005 02:47 PM

All times are GMT -4. The time now is 11:41 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.