Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Changing Tab control's Selected Tab property

462 views
Skip to first unread message

FRANKLIN

unread,
Mar 12, 2004, 2:25:51 AM3/12/04
to

My window has got a tab control with three tab pages. The
default Selected Tab property is set as 1. While opening the
window ( in Window Open Event), When I tried to change the
Selected tab property to 2 , It is not working.

Why ?

//Window Open Event
tab_1.SelectedTab = 2

Rgds.

Jerry Siegel

unread,
Mar 12, 2004, 10:51:27 AM3/12/04
to
Try tab_1.POST SelectTab(2)

<FRANKLIN> wrote in message news:405165ff.64...@sybase.com...

Franklin

unread,
Mar 12, 2004, 10:57:29 PM3/12/04
to
I tried tab_1.POST SelectTab(2) as suggested by Mr. Jerry
Siegel,
but failed.

DT

unread,
Mar 15, 2004, 9:42:44 AM3/15/04
to
Here's the code I run in the window post open event (user defined event posted
from the open event) to get it to select the second tab.

yield()
tab_1.SelectTab(2)

<FRANKLIN> wrote in message news:405165ff.64...@sybase.com...
>

Jerry Siegel

unread,
Mar 15, 2004, 10:55:57 AM3/15/04
to
The idea is to set the tab *after* the open event is done. What I think is
happening is that open completes, the window is displayed, and the tab
object gets focus, setting the tab to the default selected tab on the
control.
From the open event, post a user event (many frameworks have that built in
as ue_init, ue_postopen, or some such name). Try setting the tab in that
event.

<Franklin> wrote in message news:405286a9.73...@sybase.com...

0 new messages