Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Cancel Button on Modified mmMaintenanceForm
Message
De
23/04/2008 18:19:58
Timothy Bryan
Sharpline Consultants
Conroe, Texas, États-Unis
 
 
À
23/04/2008 10:19:06
Frank Dolinar
Mi House of Representatives
Michigan, États-Unis
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
Network:
Novell 6.x
Database:
MS SQL Server
Divers
Thread ID:
01312518
Message ID:
01312775
Vues:
17
Frank,

>Kevin, thanks for the response.
>I think I was not quite complete (or perhaps not completely clear) in my request for help.
>Your suggestion probably works if I am attempting to add this behavior to the end-user form (which is written in VB). And at that point it's pretty clear / obvious.
>However, I want to add this behavior in the mmButtonCancel_Click method of the framework because we want all our derived forms to inherit the behavior. The problem I'm having is that the generally obvious options such as setfocus don't appear to be available at all in this context.
>
>To be clear:
>1) the Cancel button on the revised mmMaintenanceForm is inherited by a number of our forms and we want the behavior to be consistent on all of those forms;
>2) when the user clicks on the Cancel button, we want undo data changes and return to the first tab of the tab control on the end user form;
>3) I'm trying to implement this behavior in mmButtonCancel_Click.
>
>I've spent some time looking at the options for trying to navigate up the control hierarchy and get to the place I want, but am not finding a path that will get me there.
>
>Any further suggestions? (anyone?)
>
>Thanks,
>Frank

The mmButtonCancel ultimately calls the Cancel() method of the form. you can override this in your form class.
public override void Cancel()
{
     base.Cancel();
     //Do your focus change next with this.SetFocus(tabControlToGetFocus)
}
Tim
Timothy Bryan
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform