Question about CADViewerControl

Discuss and ask questions about CAD .NET library.

Moderators: admin, support, SDS

Post Reply
CoffeeShop
Posts: 8
Joined: 10 Jul 2019, 05:36

Question about CADViewerControl

Post by CoffeeShop » 12 Jul 2019, 20:51

1/ how can disable left panel? I set false value for entity and property,but left panel still visible.
2/ i disable some buttons on toolbar but it not works. when i close and reopen form, it visible all like default

support
Posts: 2932
Joined: 30 Mar 2005, 11:36
Contact:

Re: Question about CADViewerControl

Post by support » 12 Jul 2019, 21:08

CoffeeShop wrote:
12 Jul 2019, 20:51
1/ how can disable left panel? I set false value for entity and property,but left panel still visible.
The entity properties panel can be hidden using a CADViewerControl.PropertyEntityPanelVisible property.
CoffeeShop wrote:
12 Jul 2019, 20:51
2/ i disable some buttons on toolbar but it not works. when i close and reopen form, it visible all like default
Could you please post the code you have tried?

Mikhail
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support

CoffeeShop
Posts: 8
Joined: 10 Jul 2019, 05:36

Re: Question about CADViewerControl

Post by CoffeeShop » 15 Jul 2019, 05:57

I change buttons on design time. I want to change it by code on run time but no see property.
Ex: disable open button on toolbar
Could you help me some code? :)

what event of CADViewerControl is fired when user select graphical object on its face (not select on entity treeview)?

support
Posts: 2932
Joined: 30 Mar 2005, 11:36
Contact:

Re: Question about CADViewerControl

Post by support » 15 Jul 2019, 19:11

Hello,

CADViewerControl provides an access to the collection of toolbar buttons through a CADViewerControl.ToolsPanel.Buttons property. Each item in the collection is an instance of a ToolBarButton class which supports Enabled and Visible properties, so you can disable or hide a particular button in the following way:

Code: Select all

cadViewerControl1.ToolsPanel.Buttons[0].Visible = false;   // hides Open button
cadViewerControl1.ToolsPanel.Buttons[0].Enabled = false;   // disables Open button
CoffeeShop wrote:
15 Jul 2019, 05:57
what event of CADViewerControl is fired when user select graphical object on its face (not select on entity treeview)?
Unfortunately, there is no event which fires when selecting an entity in ViewerCADPictureBox.

Mikhail
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support

CoffeeShop
Posts: 8
Joined: 10 Jul 2019, 05:36

Re: Question about CADViewerControl

Post by CoffeeShop » 16 Jul 2019, 18:02

I study this control for a week. Although it has a bit hard to use, but I think it awesome.

Thanks for your help, Mikhail :D

Post Reply