Solved

Infragistics UltraTabControl - Problem changing the selected tab.

Posted on 2010-11-30
11
6,446 Views
Last Modified: 2012-05-10
Hi
I'm using an Infragistics UltraTabControl version (Infragistics2.Win.UltraWinTabControl.v8.3.dll)

In my code depending on a certain data criteria I try to change the tab being displayed, with the following line of code.
Me.utcTemplatesAndWorkings.SelectedTab = Me.utcTemplatesAndWorkings.Tabs("tabBudgetSummary")

Nothing happens the tab does not change?

Any ideas.
0
Comment
Question by:dfincham28
  • 6
  • 3
  • 2
11 Comments
 
LVL 32

Expert Comment

by:Erick37
Comment Utility
Me.utcTemplatesAndWorkings.Tabs("tabBudgetSummary").Selected = True

0
 

Author Comment

by:dfincham28
Comment Utility
Hi Erick37

I tried that same result.
0
 
LVL 32

Expert Comment

by:Erick37
Comment Utility
I tried the code by adding a tab control on a form with 10 tabs.
In a button click event I call:
Me.UltraTabControl1.Tabs(9).Selected = True
and the tab scrolls into view and becomes active.

Where in your code do you make the tab active (which event)?
0
 

Author Comment

by:dfincham28
Comment Utility
Hi I tried the calling my code from a button click event and it worked.
The scenario that does not work is if I call the SelectedTab or Selected = True from the validated event on a combo box.

The selectedtab code is definately being hit i put a break point on it. The breakpoint only get hit once so it is not in some sort of crazy loop either.

thanks
0
 
LVL 83

Assisted Solution

by:CodeCruiser
CodeCruiser earned 50 total points
Comment Utility
Try calling the Application.DoEvents or Refresh method of the tabcontrol.
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

Author Comment

by:dfincham28
Comment Utility
Tried Application.DoEvents and refresh still no joy.
0
 

Author Comment

by:dfincham28
Comment Utility
I added a brand new tab control to the same region on the form with nothing on it just two tabs.
Same result.

Strangely I'm still able to disable tabs.
0
 
LVL 32

Assisted Solution

by:Erick37
Erick37 earned 450 total points
Comment Utility
Here is a workaround.  Not pretty, but it works.
1) disable the active tab
2) select a different tab
3) re-enable the previous active tab

        Dim activetab As Integer = UltraTabControl1.ActiveTab.Index
        UltraTabControl1.Tabs(activetab).Enabled = False
        UltraTabControl1.Tabs(2).Selected = True
        UltraTabControl1.Tabs(activetab).Enabled = True
0
 

Accepted Solution

by:
dfincham28 earned 0 total points
Comment Utility
Thanks For the suggestions.

A colleague of mine solved the problem using a delegate.
When you want to change the tab you invoke the delegate and in there you change the tab.

Don't ask me why this works but it does.
0
 
LVL 83

Expert Comment

by:CodeCruiser
Comment Utility
You never mentioned you are using threads or timer or backgroundworker etc!
0
 

Author Closing Comment

by:dfincham28
Comment Utility
If you want to make the tabs invisble you should also use a delegate if you have a similar problem.
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now