web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)
Answered

Name of active tab page

(0) ShareShare
ReportReport
Posted on by

Hello,

How can I get the name of  a TabPage active.

if i in the TabPage = 2 the name is Page 2, TabPage = 4, name is Page 4.

I have this

index = tabMainTab.tab(); this is  #2 Name: Page2

and in the caption  all the time give me Page1.

I have this:

 FormTabPageControl FTPC ;

;

super();

index = tabMainTab.tab() // 2

 name = FTPC.caption(); // Page 2 but all the time is Page 1

Somebody know how i can do that?

Thanks in avance.

*This post is locked for comments

I have the same question (0)
  • Martin Dráb Profile Picture
    237,681 Most Valuable Professional on at
    RE: Name of active tab page

    I took the liberty to change your title from FormTabControl to a more descriptive Name of active tab page. I also changed the category from Other to Development / Customization / SDK and replaced the sentence you used as a tag (Name of TabPage active.) with something more suitable for categorization (tab page).

  • Martin Dráb Profile Picture
    237,681 Most Valuable Professional on at
    RE: Name of active tab page

    I don't believe that your code works. You never set the value of FTPC variable, therefore FTPC.caption() should fail, because you're trying to call a method on a null reference.

  • Verified answer
    Martin Dráb Profile Picture
    237,681 Most Valuable Professional on at
    RE: Name of active tab page

    You can get the active tab page by calling tabMainTab.getActivePage():

    FormTabPageControl activeTabPage = tabMainTab.getActivePage();
    activeTabPage.caption();
  • Community Member Profile Picture
    on at
    RE: Name of active tab page

    Ok, thank you for the explanation.

  • Martin Dráb Profile Picture
    237,681 Most Valuable Professional on at
    RE: Name of active tab page

    If your question is now answered, please close the thread by marking the verified answer(s). It will make clear that the thread doesn't need attention anymore, and people with the same question will easily locate the answer.

    Notice "Did this answer your question?" beside each reply.

  • itlabnarmi_ivoruk Profile Picture
    135 on at
    RE: Name of active tab page

    Hi, where to write above two line of code, I mean on which method override ?

  • Martin Dráb Profile Picture
    237,681 Most Valuable Professional on at
    RE: Name of active tab page

    Anywhere in the form where you need the information (the name of the active tab page).

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Priya_K Profile Picture

Priya_K 4

#2
Alexey Lekanov Profile Picture

Alexey Lekanov 3

#3
Scott_itD Profile Picture

Scott_itD 2 Community Manager

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans