Solved

Infragistics UltraTabControl - Problem changing the selected tab.

Posted on 2010-11-30
11
6,678 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
ID: 34240642
Me.utcTemplatesAndWorkings.Tabs("tabBudgetSummary").Selected = True

0
 

Author Comment

by:dfincham28
ID: 34245763
Hi Erick37

I tried that same result.
0
 
LVL 32

Expert Comment

by:Erick37
ID: 34248340
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
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

Author Comment

by:dfincham28
ID: 34255469
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
ID: 34255821
Try calling the Application.DoEvents or Refresh method of the tabcontrol.
0
 

Author Comment

by:dfincham28
ID: 34257246
Tried Application.DoEvents and refresh still no joy.
0
 

Author Comment

by:dfincham28
ID: 34257308
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
ID: 34257572
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
ID: 34268479
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
ID: 34269013
You never mentioned you are using threads or timer or backgroundworker etc!
0
 

Author Closing Comment

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

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

838 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