Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 1.0 > C#
|
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 7th, 2007, 01:30 AM
Authorized User
 
Join Date: Sep 2005
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:
http://i199.photobucket.com/albums/a...rmDatabase.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;
    }
Any help would be greatly appreciated!

Panuvin








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





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