GetActiveTab method (WinStudio scripts)

Applies To

IWSForm interface

Definition

Returns the name of the active IdsTabConten component in the first IdsTabsContext on the form that uses hidden tab headers, hide-headers: true in the IDS configuration.
Note: This method applies only to IDS forms.

The method returns the tab name when a matching IdsTabsContext is found. If no matching context exists, the method returns an empty string.

Syntax

object.GetActiveTab

Example

using System;
using Mongoose.IDO.Protocol;
using Mongoose.Scripting;
namespace Mongoose.FormScripts
{
   public class theForm : FormScript
   {
      public void ShowCurrentTab()
      {
         string activeTab = ThisForm.GetActiveTab();
         if ( string.IsNullOrEmpty( activeTab ) )
            Application.ShowMessage( "No active tab." );
         else
            Application.ShowMessage( "Active tab: " + activeTab );
      }
   }
}