how to open the particular tabpage when click a button

Posted by Admin on 09-Sep-2009 00:11

hi...can anyone help me...

     i have problem how to open the particular tabpage under button event when use the tabControl tool in openedge architect 10.2A..

     For example, i create a tabControl in a form which contain 2 tab (tabPage1 & tabPage2)... then, when i click "main" button in link and display the tabPage1..
If anyone has a suggestion please let me know...

All Replies

Posted by marko.rueterbories on 09-Sep-2009 01:38

Hi Munira,

to change the SelectedTab of a Microsoft TabControl you just have to use the following line of code.

THIS-OBJECT:tabControl1:SelectedTab = THIS-OBJECT:tabPage1.

the SelectedTab property of the TabControl is of type System.Windows.Forms.TabPage. So you are able to assign the TabPage which should be shown next to this property.


Posted by Admin on 09-Sep-2009 20:44

Tq Marko.....nw it's working...for my tabControl..thanks a lot.

How about if i use ultraTabControl...the code is different rite??

i try use same code error...if u know...i hope u can share also with me...

Posted by marko.rueterbories on 10-Sep-2009 01:50

With the Infragistics UltraTabControl it's pretty mutch the same to what you did with the Microsoft TabControl.

You have to assign a new UltraTab to the property "SelectedTab" of the ultraTabControl. The property "SelectedTab" is of type Infragistics.Win.UltraWinTabControl.UltraTab .

Now there are two way to do so.

ultraTabControl1:SelectedTab = ultraTabPageControl1:Tab.

This is nearly the same to what you do with a Microsoft TabControl

ultraTabControl1:SelectedTab = ultraTabControl1:Tabs:Item["NewTabKey":U].

In this case you use the "Key" value of the Tab to get a referenze from the "Tabs" collection of the ultraTabControl.

I hope that helps.



Posted by Admin on 10-Sep-2009 02:10's working. Thank Marko...for your help. 

This thread is closed