NetTalk Central

Author Topic: Refresh Tab Heading  (Read 3263 times)

kevin plummer

  • Hero Member
  • *****
  • Posts: 1195
    • View Profile
    • Production Accounting and Software Payroll
Refresh Tab Heading
« 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

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Refresh Tab Heading
« Reply #1 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



« Last Edit: March 30, 2015, 05:29:17 AM by Bruce »

kevin plummer

  • Hero Member
  • *****
  • Posts: 1195
    • View Profile
    • Production Accounting and Software Payroll
Re: Refresh Tab Heading
« Reply #2 on: March 30, 2015, 02:26:23 AM »
Thanks Bruce, it works a treat now!

Robert Iliuta

  • Sr. Member
  • ****
  • Posts: 472
    • View Profile
    • Email
Re: Refresh Tab Heading
« Reply #3 on: March 30, 2015, 02:31:11 AM »
cool!  8)

thanks Bruce!