Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / March 2006

Tip: Looking for answers? Try searching our database.

What is the best way to get the next TabIndex number?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
tribbles - 24 Mar 2006 20:07 GMT
I have a fun problem in that when I copy and paste controls in my
designer applciation I get duplicate tab indexes.  In order to help the
user out I want to know wha tthe highest tab index is on the screen and
then increment it for the newly pasted controls.  Sicne users can
delete cotnrols, there is no guarantee that just a count of the number
of controls will give the correct max tab index in play and I dislike
having to search through all the controls on the screen to jsut do a
count or to get the max...   Is there an easier way?  Is there an MS
tab index service for generating tab indexes?
Bruce Wood - 26 Mar 2006 08:09 GMT
You could maintain your own records... keep the highest tab index
inserted so far. However, that's fallible. Compared against the user's
reaction time and their perception of events, I'll be that simply using
the brute force method: walking the control hierarchy and finding the
maximum tab index each time will be so fast that nobody will notice it
happening. Brute force is also the surest method: you know for a fact
that you'll always get the correct maximum.

Try the brute force method first, then introduce fancy record-keeping
only if it proves unsatisfactory.
Cerebrus - 26 Mar 2006 11:48 GMT
I agree with Bruce... Brute force method is the way to go !

Always knew there was something brutish about me !! ;-)

Regards,

Cerebrus.

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.