You can setup a before tool activate event.
baseToolbarsManager.BeforeToolActivate += new Infragistics.Win.UltraWinToolbars.CancelableToolEventHandler(baseToolbarsManager_BeforeToolActivate);
private static void baseToolbarsManager_BeforeToolActivate(object sender, Infragistics.Win.UltraWinToolbars.CancelableToolEventArgs args)
{
If(args.Tool.Key == "DeleteTool")
{
args.Cancel = true;
}
}
Jim Kinneman
Encompass Solutions
jimki@...
baseToolbarsManager.BeforeToolActivate += new Infragistics.Win.UltraWinToolbars.CancelableToolEventHandler(baseToolbarsManager_BeforeToolActivate);
private static void baseToolbarsManager_BeforeToolActivate(object sender, Infragistics.Win.UltraWinToolbars.CancelableToolEventArgs args)
{
If(args.Tool.Key == "DeleteTool")
{
args.Cancel = true;
}
}
Jim Kinneman
Encompass Solutions
jimki@...
--- In vantage@yahoogroups.com, "Kevin Simon" <ksimon@...> wrote:
>
> Unfortunately, the args.Cancel() doesn't work. When issuing this command, I
> get the error:
>
> 'Cancel' is not a member of
> 'Infragistics.Win.UltraWinToolbars.ToolClickEventArgs'.
>
>
>
>
>
> From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of
> bw2868bond
> Sent: Tuesday, October 12, 2010 8:00 AM
> To: vantage@yahoogroups.com
> Subject: [Vantage] Re: ToolClick cancel
>
>
>
>
>
> Just guessing here,
>
> args.Cancel()
>
> --- In vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> ,
> "ksimon8fw" <ksimon@> wrote:
> >
> > I want to disallow certain printing events in the packing slip program. I
> have the code in the toolclick event, but I'm not sure how to cancel the
> event. Here's the code:
> >
> >
> > Private Sub baseToolbarsManager_ToolClick(ByVal sender As Object, ByVal
> args As Infragistics.Win.UltraWinToolbars.ToolClickEventArgs)
> > Select Case (args.Tool.Key)
> > Case "PrintTool", "PrintPackingTool"
> > check for certain events.
> > if certain events occur
> > How do I issue a cancel command here?
> > End If
> > Case Else
> > End Select
> > End Sub
> >
> > Does anyone have the syntax to cancel the toolclick event?
> >
> > Thanks.
> > Kevin Simon
> >
>
>
>
>
>
> [Non-text portions of this message have been removed]
>