Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Prevent User from choosing a tab
Message
De
14/11/2007 14:15:22
Timothy Bryan
Sharpline Consultants
Conroe, Texas, États-Unis
 
 
À
14/11/2007 10:24:38
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Versions des environnements
Environment:
VB 8.0
OS:
Windows XP SP2
Divers
Thread ID:
01265436
Message ID:
01268953
Vues:
7
Hi Tony,

Another thing I had done once was to put a control over the top of the tab to hide it. I sent it to the back when I wanted the user to have access. The control was not visible to the user so they couldn't tell it was there, but the tab showed up when they were granted access. It looked good, but seemed kind of hookey but it was real easy. I do wish MS would enhance the tab control to be more flexible as it is a nice control for lots of things.
Tim

>Since the tab control was giving me so much trouble with its events, I found another solution to the problem of preventing a user from clicking on another tab before they click on the 'Save' button.
>
>It seems that the tab page's 'Enter' event will work:
>
>  Private Sub LineItemEntry_Enter(ByVal sender As System.Object, _
>      ByVal e As System.EventArgs) Handles LineItemEntry.Enter
>    If (Me.glEditable And Not Me.glAdding) Or Me.glSaved = True _
>        Or Me.chkPOComplete.Checked Then
>      'Set up the LineItemEntry page
>      SetTypeReqLabels()
>    Else
>      'Skip back to the previous page
>      Me.TabControl.SelectedTab = Me.PropertiesPage
>      MsgBox("Please click on the  [ Save Req ]  button first", _
>        MsgBoxStyle.OkOnly, "Notice")
>    End If
>  End Sub
>
>
>Hope this helps someone.
Timothy Bryan
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform