SetIsEnabled

Parent Previous Next

SetIsEnabled

This function will set a tab Enabled or Disabled in the Tab Object.


Function Definition:


void SetIsEnabled(int index, bool IsEnabled)


.     int index: A integer parameter containing the index of the tab that will be enabled/disabled.

.     bool IsEnabled: A boolean parameter containing a true/false value. If the value is "true" the tab will become enabled, and if the value is "false" the tab will become disabled.



To configure this function, follow the steps below:


1.   In an object event, configure the SetIsEnabled function: TabObjectName.SetIsEnabled(index, true);


2.   During the execution of RunTime, run the configured event.



Example Enable:


In the graphic document, the user has one Tab object (named as TabControl1) with 3 tabs configured: "Graphics1", "Graphics2" and "Graphics3". In a Button object (named as Button1) the user configures the MouseUp event with the following event:


TabControl1.SetIsEnabled(1, true);


In this event, the Tab object will enable the "Graphics2" tab, that is, the user will be able to see the content of this tab.



Example Disable:


In the graphic document, the user has one Tab object (named as TabControl1) with 3 tabs configured: "Graphics1", "Graphics2" and "Graphics3". In a Button object (named as Button1) the user configures the MouseUp event with the following event:


TabControl1.SetIsEnabled(1, false);


In this event, the Tab object will disable the "Graphics2" tab, that is, the user will not be able to see the content of this tab.



 

Note: The index of the tabs in the object starts with index 0 (zero)

  

 

Note: This property exists only to the following objects:

.     Tab