NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: kevin plummer on March 26, 2015, 06:02:26 AM

Title: Refresh Tab Heading
Post by: kevin plummer on March 26, 2015, 06:02:26 AM
Hi All,

Is it possible to refresh a Tab Heading when I click a new row in a browse? I've added the tab equates to the browse refresh section.

Tab Heading = 'Details for ' & p_web.gsv('DMH:FirstName') & ' ' & p_web.gsv('DMH:LastName')

Cheers,

Kevin
Title: Re: Refresh Tab Heading
Post by: Bruce on March 26, 2015, 11:22:26 PM
Hi Kevin,

I worked it out, but it was a bit icky, so I decided to add a method to the class to make it easier, and discovered there was a method already there <g>.

a) in the form search for 'childnewselection'. You should find one for all the possible children, including procedures (browses), other forms and so on. Pick the one that is correct for you.

b) p_web.SetTabText('UpdateCustomers', 0, 'General ' & random(1,100),loc:TabStyle)

the first parameter is the name of the procedure. (This is not case sensitive.)
The second parameter is the tab number. Please note that tabs are counted from 0. Hidden tabs are counted, "Excluded" tabs are not.
The third parameter is the new text for the heading.
The 4th parameter tells the method what TabStyle you are using - you should leave that as is. However if you are using 8.42 or earlier use loc:WebStyle instead of loc:TabStyle.

As from 8.43 this technique works with all tab types - for 8.42 and earlier it only works for the Tab tab type.

cheers
Bruce



Title: Re: Refresh Tab Heading
Post by: kevin plummer on March 30, 2015, 02:26:23 AM
Thanks Bruce, it works a treat now!
Title: Re: Refresh Tab Heading
Post by: Robert Iliuta on March 30, 2015, 02:31:11 AM
cool!  8)

thanks Bruce!