programmatically selecting a tabstrip item without clicking an item 
Author Message
 programmatically selecting a tabstrip item without clicking an item
Hello!

I am using a tabstrip control with frames. When I click on a tabstrip item,
I hide or show the frames based on which item was clicked on as follows....
 Select Case TabStrip1.SelectedItem.Index
  Case 1 'Sales Order tab
    fraSalesOrders.Visible = True
    fraCustomers.Visible = False
  Case 2 'Customers tab
    fraSalesOrders.Visible = False
    fraCustomers.Visible = True
end select

How do you select a tabstrip item programmaticall from a button on another
form without clicking on the tabstrip? or if you can't execute a tabstrip
click then how do you change which tab is on top (has focus).

Thanks,
Kevin



Sun, 21 Aug 2005 02:06:30 GMT  
 programmatically selecting a tabstrip item without clicking an item
TabStrip1.Tabs(x).Selected=True, x is the Index of the tab you want to
select


Quote:
> Hello!

> I am using a tabstrip control with frames. When I click on a tabstrip
item,
> I hide or show the frames based on which item was clicked on as
follows....
>  Select Case TabStrip1.SelectedItem.Index
>   Case 1 'Sales Order tab
>     fraSalesOrders.Visible = True
>     fraCustomers.Visible = False
>   Case 2 'Customers tab
>     fraSalesOrders.Visible = False
>     fraCustomers.Visible = True
> end select

> How do you select a tabstrip item programmaticall from a button on another
> form without clicking on the tabstrip? or if you can't execute a tabstrip
> click then how do you change which tab is on top (has focus).

> Thanks,
> Kevin



Sun, 21 Aug 2005 04:03:29 GMT  
 programmatically selecting a tabstrip item without clicking an item
This would activate the second tab in the strip.

Me.TabStrip1.Tabs(2).Selected = True

An easier control would be the Tabbed Dialog Control.  With this tab you
would not need to write code to make frames visible.  It would be automatic.
It also has a TAB property that can change the position of the tab.

Me.SSTab.tab = 1

Just a thought



Sun, 21 Aug 2005 11:09:33 GMT  
 programmatically selecting a tabstrip item without clicking an item
Kevin,

Call the tabstrip's click event yourself, lise so:

Call TabStrip1_Click(2)

This simulates a click, and has the attendant benefit of also running
your frame-managing code.

--A



Mon, 22 Aug 2005 05:34:32 GMT  
 programmatically selecting a tabstrip item without clicking an item
This did not work. The wrong tab is on top. How do I change the Ontop tab?
....from another form?


Quote:
> Hello!

> I am using a tabstrip control with frames. When I click on a tabstrip
item,
> I hide or show the frames based on which item was clicked on as
follows....
>  Select Case TabStrip1.SelectedItem.Index
>   Case 1 'Sales Order tab
>     fraSalesOrders.Visible = True
>     fraCustomers.Visible = False
>   Case 2 'Customers tab
>     fraSalesOrders.Visible = False
>     fraCustomers.Visible = True
> end select

> How do you select a tabstrip item programmaticall from a button on another
> form without clicking on the tabstrip? or if you can't execute a tabstrip
> click then how do you change which tab is on top (has focus).

> Thanks,
> Kevin



Tue, 23 Aug 2005 23:42:05 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Programmatically delete an item from the Sent items

2. Programmatically delete an item from the Sent Items Folder

3. tabstrip selected item

4. Programmatically double-clicking a ListView Item

5. Programmatically selecting items on ListBox problem

6. Setting Selected Items Contact Property Programmatically

7. To programmatically select an item in a List?

8. Newbie: set the selected item in a combo box programmatically

9. Select an item in TreeView programmatically

10. jump listview to the hilight item (selected item)...

11. Add macro to right click menu and get selected item in contacts

12. Select ListBox item with right click

 

 
Powered by phpBB® Forum Software