CyDAS General Controls: Class TabControlX
The class TabControlX represents a TabControl which was improved in that non-enabled tab pages are locked.
By simply subclassing the standard Microsoft TabControl, all the constructors, methods and properties are also available with TabControlX.
By overriding the OnSelectedIndexChanged method, a tab page whose enabled property is set to false is rendered inaccessible.
Programming Language
- Microsoft Visual Basic .Net.
Availability
- Copyrighted but free software under the GNU Public License.
- Binaries and source code can be obtained from the Download section.
Inserting TabControlX in older projects
Because of its full compatibility with the standard control, TabControlX can easily replace the standard control.
In the references section of your project, add a reference to CyDASGeneralControls.
In the classes using TabControl, only a few line need changing:
At the top, an Imports statement is useful:
Imports CyDASGeneralControls
In the region "Code generated by the Windows Form Designer", the controls
of the form are declared:
Friend WithEvents TabControl1 As System.Windows.Forms.TabControl
Replace this with
Friend WithEvents TabControl1 As TabControlX
Farther down in the function "<System.Diagnostics.DebuggerStepThrough()>
Private Sub InitializeComponent()"
replace the line
Me.TabControl1 = New System.Windows.Forms.TabControl()
with
Me.TabControl1 = New CyDASGeneralControls.TabControlX()
That's all you need to do in order to get the impoved functionality of TabControlX.