Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Title of the TAB in the tabstrip control

oleg_sukharenko
Explorer
0 Kudos

Hi,

I need to change a title of the TAB dynamically in the program.

How can I do it?

Thanks.

1 ACCEPTED SOLUTION

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

Ok, I just test this and it worked good.

First, go to screen painter layout, where the tabstrip is, double click on the tab name, It should have a value in the Name box, if not put one there. For the rest of this example we will call this name TABA, also while in this dialog, make sure to check the box on the Program tab below for "Output Field". Also make sure to make the lenght of these fields more than the 4 characters that they probably are now, make them like 10 or so. Do all this for each tab, each tab should have a different name, TABA, TABB, TABC.

Now in your program, declare the variables for TABA, etc.

data: taba(10) type c,

tabb(10) type c.

Now in your PBO, you can fill the text into the varaibles.




module STATUS_0100 output.
*  SET PF-STATUS 'xxxxxxxx'.
*  SET TITLEBAR 'xxx'.

TABA = 'This is tab A'.
TABB = 'This is tab B'.

endmodule.                 " STATUS_0100  OUTPUT

That should be it.

Regards,

RIch HEilman

4 REPLIES 4

Former Member
0 Kudos

I Guess it is not possible

Thanks

Seshu

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

Ok, I just test this and it worked good.

First, go to screen painter layout, where the tabstrip is, double click on the tab name, It should have a value in the Name box, if not put one there. For the rest of this example we will call this name TABA, also while in this dialog, make sure to check the box on the Program tab below for "Output Field". Also make sure to make the lenght of these fields more than the 4 characters that they probably are now, make them like 10 or so. Do all this for each tab, each tab should have a different name, TABA, TABB, TABC.

Now in your program, declare the variables for TABA, etc.

data: taba(10) type c,

tabb(10) type c.

Now in your PBO, you can fill the text into the varaibles.




module STATUS_0100 output.
*  SET PF-STATUS 'xxxxxxxx'.
*  SET TITLEBAR 'xxx'.

TABA = 'This is tab A'.
TABB = 'This is tab B'.

endmodule.                 " STATUS_0100  OUTPUT

That should be it.

Regards,

RIch HEilman

0 Kudos

Hi Rich,

Excellent ,I Saw the Tab strip Properties and there is no field related Name in TABSTRIP ,I thought it is not possible.

Thanks

Seshu

oleg_sukharenko
Explorer
0 Kudos

Rich!

Thanks!!!!