Author Topic: Tool Palette  (Read 1763 times)

0 Members and 1 Guest are viewing this topic.

cadpro

  • Guest
Tool Palette
« on: December 05, 2011, 05:55:25 PM »
Hi,

Could any expert help me on how to create a tool palette with buttons or whatever please? Something like the default tools palette that AutoCAD contains.

Thanks

BlackBox

  • King Gator
  • Posts: 3770
Re: Tool Palette
« Reply #1 on: December 05, 2011, 06:01:27 PM »
I'm relatively new to .NET myself, but I've made good progress using Kean's tutorial:

Hosting WPF content inside an AutoCAD palette

HTH
"How we think determines what we do, and what we do determines what we get."

cadpro

  • Guest
Re: Tool Palette
« Reply #2 on: December 06, 2011, 07:47:15 AM »
Thanks RenderMan. That was helpful just for creating a Tool Palette. But I have inserted a button to the tool palette. On it's click event, I have passed an AutoCAD command which opens a form. But when I close that form using it X close button, the form again pops up. Please help.

Thanks

Jeff H

  • Needs a day job
  • Posts: 6151
Re: Tool Palette
« Reply #3 on: December 06, 2011, 07:58:14 AM »
I have not looked into your problem but this might help
 
Quote
When a form is displayed as a modal dialog box, clicking the Close button (the button with an X at the upper-right corner of the form) causes the form to be hidden and the DialogResult property to be set to DialogResult.Cancel. Unlike modeless forms, the Close method is not called by the .NET Framework when the user clicks the close form button of a dialog box or sets the value of the DialogResult property. Instead the form is hidden and can be shown again without creating a new instance of the dialog box. Because a form displayed as a dialog box is not closed, you must call the Dispose method of the form when the form is no longer needed by your application
LINK

BlackBox

  • King Gator
  • Posts: 3770
Re: Tool Palette
« Reply #4 on: December 06, 2011, 09:59:50 AM »
@Jeff - As always, great info, my friend! :beer:

@Cadpro - If you're still experiencing some difficulty, please post your code.  :-)

"How we think determines what we do, and what we do determines what we get."

cadpro

  • Guest
Re: Tool Palette
« Reply #5 on: December 06, 2011, 04:50:01 PM »
Thanks all. I've sorted it out. Thanks again.