.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

TaskDialog - Can't disable cancellation

2 REPLIES 2
Reply
Message 1 of 3
BMcAnney
445 Views, 2 Replies

TaskDialog - Can't disable cancellation

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

2 REPLIES 2
Message 2 of 3
BMcAnney
in reply to: BMcAnney

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

Message 3 of 3
BMcAnney
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

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost