Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > .NET 1.0 and Visual Studio.NET > VS.NET 2002/2003
|
VS.NET 2002/2003 Discussions about the Visual Studio.NET programming environment, the 2002 (1.0) and 2003 (1.1). ** Please don't post code questions here ** For issues specific to a particular language in .NET, please see the other forum categories.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VS.NET 2002/2003 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 16th, 2003, 06:19 AM
Friend of Wrox
 
Join Date: Sep 2003
Posts: 121
Thanks: 0
Thanked 0 Times in 0 Posts
Default Preventing tab controls from changing page


I have a simple tab control with 4 tab pages displayed under it.

I only wish to allow the user to change tab page once they have
filled out certain text boxes on each tab page (a wizard entry
type app).

My question: how can I prevent the user from changing tab page ?
(ie until they have entered the required data on each tab page).

Any help much appreciated.
 
Old December 16th, 2003, 03:22 PM
Authorized User
 
Join Date: Nov 2003
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hello,

       Just put causevalidation at true for all of page in the tabcontrol. In the event validating of each page put the code who check if all conditions is ok.
Example :
    Private Sub TabPage1_Validating(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles TabPage1.Validating
        If text1.text = "" And text2.text = "" Then
            e.Cancel = True
        End If
    End Sub

         i hope that will help you

Exarkuun

 
Old December 17th, 2003, 05:35 AM
Friend of Wrox
 
Join Date: Sep 2003
Posts: 121
Thanks: 0
Thanked 0 Times in 0 Posts
Default

That helps me very much. I am very grateful.
Thank you.
Chas.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing tab control style at runtime. John Deutsch Access VBA 2 October 19th, 2007 12:01 PM
Formatting tab controls Bob Pierce Access 3 April 6th, 2007 10:08 AM
Preventing access to a page in PHP Steve777 PHP How-To 1 July 22nd, 2005 01:18 PM
Preventing Page Caching neeter HTML Code Clinic 3 June 5th, 2003 01:19 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.