Profile Picture

Document Manager

Posted By Ian Hammond 14 Years Ago
Author
Message
Ian Hammond
Posted 14 Years Ago
View Quick Profile
Junior Member

Junior Member (11 reputation)Junior Member (11 reputation)Junior Member (11 reputation)Junior Member (11 reputation)Junior Member (11 reputation)Junior Member (11 reputation)Junior Member (11 reputation)Junior Member (11 reputation)Junior Member (11 reputation)

Group: Forum Members
Last Active: 13 Years Ago
Posts: 11, Visits: 1

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

Many thanks.



Nevron Support
Posted 14 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: Last Week
Posts: 3,054, Visits: 4,009

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;

 

 



Best Regards,
Nevron Support Team



Ian Hammond
Posted 14 Years Ago
View Quick Profile
Junior Member

Junior Member (11 reputation)Junior Member (11 reputation)Junior Member (11 reputation)Junior Member (11 reputation)Junior Member (11 reputation)Junior Member (11 reputation)Junior Member (11 reputation)Junior Member (11 reputation)Junior Member (11 reputation)

Group: Forum Members
Last Active: 13 Years Ago
Posts: 11, Visits: 1

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



Nevron Support
Posted 14 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: Last Week
Posts: 3,054, Visits: 4,009

Hi Ian,

DocumentStyle is a property of the NDockManager not NDocumentManager.



Best Regards,
Nevron Support Team



Ian Hammond
Posted 14 Years Ago
View Quick Profile
Junior Member

Junior Member (11 reputation)Junior Member (11 reputation)Junior Member (11 reputation)Junior Member (11 reputation)Junior Member (11 reputation)Junior Member (11 reputation)Junior Member (11 reputation)Junior Member (11 reputation)Junior Member (11 reputation)

Group: Forum Members
Last Active: 13 Years Ago
Posts: 11, Visits: 1

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

 



Nevron Support
Posted 14 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: Last Week
Posts: 3,054, Visits: 4,009

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.



Best Regards,
Nevron Support Team



Ian Hammond
Posted 14 Years Ago
View Quick Profile
Junior Member

Junior Member (11 reputation)Junior Member (11 reputation)Junior Member (11 reputation)Junior Member (11 reputation)Junior Member (11 reputation)Junior Member (11 reputation)Junior Member (11 reputation)Junior Member (11 reputation)Junior Member (11 reputation)

Group: Forum Members
Last Active: 13 Years Ago
Posts: 11, Visits: 1

My problem is now fixed thanks to the example code.

Many thanks.





Similar Topics


Reading This Topic