.NET

Reply
Distinguished Contributor
BMcAnney
Posts: 406
Registered: ‎12-09-2003
Message 1 of 3 (165 Views)

TaskDialog - Can't disable cancellation

165 Views, 2 Replies
03-16-2012 01:33 PM

I'm using TaskForms (Autodesk.Windows.TaskForm), and it's all working pretty well, with one exception. I can't seem to disallow cancellation of the taskform. The class has a property called AllowDialogCancellation, but regardless of what I set that to the dialog still has a clickable X, and can also be closed with the escape key. Does anyone know where I'm going wrong?

 

Thanks!

Brent McAnney

Distinguished Contributor
BMcAnney
Posts: 406
Registered: ‎12-09-2003
Message 2 of 3 (127 Views)

Re: TaskDialog - Can't disable cancellation

03-22-2012 07:02 AM in reply to: BMcAnney

Sorry, where I say TaskForm above, I meant to say TaskDialog (Autodesk.Windows.TaskDialog).

Distinguished Contributor
BMcAnney
Posts: 406
Registered: ‎12-09-2003
Message 3 of 3 (119 Views)

Re: TaskDialog - Can't disable cancellation

03-22-2012 08:00 AM in reply to: BMcAnney

Well, I figured it out. Sort of. This happens as soon as I add a second button to the form. If I comment out the second button definition, everything works great, but as soon as I add a second button, the form becomes cancellable.

 

This works:

td.UseCommandLinks = True
td.Buttons.Add(New TaskDialogButton(1, "Continue"))
td.DefaultButton = 1

 

This does not:

td.UseCommandLinks = True
td.Buttons.Add(New TaskDialogButton(1, "Continue"))
td.Buttons.Add(New TaskDialogButton(2, "Cancel"))
td.DefaultButton = 1

 

Seems like a bug to me.

 

-Brent McAnney

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community