Nevron Forum

Document Manager

https://www.nevron.com/Forum/Topic4030.aspx

By Ian Hammond - Monday, August 23, 2010

Could someone please tell me how to hide the close button in the document manager or document.

Many thanks.

By Nevron Support - Monday, August 23, 2010

Hello Ian,

Depending of the document view style you can hide the Close button as follows:

if document view style is:

- MdiStandard; The type of Host property of the NUIDocument should be NMdiChild. In this case you should set CloseButton to false:

nDockManager1.DocumentStyle.DocumentViewStyle = DocumentViewStyle.MdiStandard;

NUIDocument doc1 = new NUIDocument();

NMdiChild child = doc1.Host as NMdiChild;

if (child != null)

{

    child.CloseButton = false;

}

 

- MdiTabbed; In this case you can set which buttons of the tabbed part to be visible by setting StripButtons property of the DocumentStyle:

nDockManager1.DocumentStyle.DocumentViewStyle = DocumentViewStyle.MdiTabbed;

nDockManager1.DocumentStyle.StripButtons = DocumentStripButtons.None;

 

 

By Ian Hammond - Tuesday, August 24, 2010

I have tried to test out this solution but I can't find the property DocumentStyle in my document manager which is defined as :

 

public NDocumentManager _manager;

Am I missing something here?

Many thanks

By Nevron Support - Tuesday, August 24, 2010

Hi Ian,

DocumentStyle is a property of the NDockManager not NDocumentManager.

By Ian Hammond - Tuesday, August 24, 2010

Hi,

Does this mean I cannot disable the close on the document manager or its documents?

I did notice that the Document Manager has an event for change of style which added to the confusion.

Regards

 

By Nevron Support - Tuesday, August 24, 2010

Hi Ian,

You can disable Close button of the NUIDocument depending of the document view style, as it is describe in the example code snipped above.

By Ian Hammond - Wednesday, August 25, 2010

My problem is now fixed thanks to the example code.

Many thanks.