Appn startup time and selection of Tab Item programmatically

Thread is closed for posting
5 posts, 0 answers
  1. Mukunda Manoj
    Mukunda Manoj avatar
    35 posts
    Member since:
    Apr 2006

    Posted 22 Feb 2007 Link to this post

    1.) I've been using the TabStrip of R.a.d. Controls for winforms.
    The application startup time has increased since i've added a tabstrip to one of my forms.
    I've just dragged the tabstrip from the toolbox and added three items to it. In addition to the tabstrip, my form has a few labels and text boxes on the form.

    2.) In Designer, selected a tab and the shape property shows "TabOffice12Shape". I tried setting it to some other by selecting from the dropdown available. It works fine. If i try to change it something else, the system gets hanged on for a moment and then the visual studio gets closed. This happens if i try to change the shape for the second time. Is this not supposed to be changed more than once?

    3.) How can i select an item in the tabstrip programmatically?
    Is there something like RadTabStrip1.items.item(0).select() ??
    How can i avoid selection of first element by default?
    I want no item on tabstrip to be selected when form is loaded and the user would click on an item to select.

    I'm using RadControlsWinforms_Q4_2006_SP1_trial_setup.exe.
  2. Jack
    Jack avatar
    2333 posts

    Posted 23 Feb 2007 Link to this post

    Hello Magenta,

    We couldn't reproduce your problem with TabStrip's Shape property with our latest  release. Please download and install the Q42006 SP2  version and try with it instead.

    To select a TabItem do one of the following:

    1. radTabStrip.SelectedTab = myTab
    2. myTab.IsSelected = True

    Kind regards,
    Tsvetan Raikov
    the telerik team
  3. Simon Durant
    Simon Durant avatar
    5 posts
    Member since:
    Jan 2007

    Posted 26 Feb 2007 Link to this post

    Just to confirm, there's no way to programmatically set the tab based on some form of index?? I want to use the tabstrip as the basis for a wizard screen, where the user can click on previous & next buttons to set the appropriate tab.

    No worries, i'm using the following code to 'step' forwards and backwards...

    private void btnPrevious_Click(object sender, EventArgs e)  
        Telerik.WinControls.RadItem item = rtsWizard.SelectedTab as Telerik.WinControls.RadItem;  
        int index = rtsWizard.Items.IndexOf(item) - 1;  
        rtsWizard.SelectedTab = rtsWizard.Items[index];  
    private void btnNext_Click(object sender, EventArgs e)  
        Telerik.WinControls.RadItem item = rtsWizard.SelectedTab as Telerik.WinControls.RadItem;  
        int index = rtsWizard.Items.IndexOf(item) + 1;  
        rtsWizard.SelectedTab = rtsWizard.Items[index];  
  4. Boyko Markov
    Boyko Markov avatar
    610 posts

    Posted 26 Feb 2007 Link to this post

    Hello Simon,

    I was unable to reproduce the problem with the latest version of rad Tabstrip. I created a sample project with the RadTabStrip control and did the following:
    1. Dragged and dropped a new instance of radTabStrip from the VS2005 toolbox.
    2. Dragged and dropped two new instances of radButton from the VS2005 toolbox and named them Previous and Next
    3. Handled the click events of those buttons and pasted your source code there
    4. Added three TabItems to the RadTabStrip and placed an instances of RadButton on the first, RadCheckBox on the second and RadTrackBar on the third.
    When I clicked the previous or next buttons I was successfully moved back and forth to the the selected tabItem.

    Hint: You could add a check about getting an  IndexOutOfRange exception because there is no check whether the index of the tabItem is valid when you change the selected tab.

    Can you give us more information on the version you are currently using? The problem you are experiencing may be related to an older versions of our suite. If you could reproduce the problem with the latest version of RadControls for WinForms (Q4 SP2),  please send us a sample project where the error is present. You can do so in a new support ticket.


    the telerik team
  5. Simon Durant
    Simon Durant avatar
    5 posts
    Member since:
    Jan 2007

    Posted 26 Feb 2007 Link to this post

    Just to clarify, my original post was asking how i could programmatically move between tabs ( without iterating through the items collection etc ). I found a way to do that after posting, so i edited my post ( from 'No worries' down ) to say that all was good.
Back to Top