sample link hosted on zippyshare
In this sample, when you launch it:
-you can check the listviewitem called 'toto' (this call the AddDockTab() method)
-you can uncheck the listviewitem called 'toto' (this call the DelDockTab() method) but nothing happens.
Any idea ?
In this sample, when you launch it:
-you can check the listviewitem called 'toto' (this call the AddDockTab() method)
-you can uncheck the listviewitem called 'toto' (this call the DelDockTab() method) but nothing happens.
Any idea ?
4 Answers, 1 is accepted
0
Accepted
Hi Patrice,
Thank you for contacting Telerik support.
The remove does not work because AddDocument method is used when DocumentWindow is added. And actually DocumentWindow is added rather the ToolWindow. You can add a ToolWindow with the following method:
If you want to use DocumentWindows you can recreate you methods for example like this:
Also I have noticed that the code samples in our documentation articles are switched, which may have misguided you to the use the AddDocument method. I will fix this and it will appear correctly the next time the documentation is uploaded.
I hope this helps. Should you have any other questions do not hesitate to ask.
Regards,
Dimitar
Telerik
Thank you for contacting Telerik support.
The remove does not work because AddDocument method is used when DocumentWindow is added. And actually DocumentWindow is added rather the ToolWindow. You can add a ToolWindow with the following method:
Me
.radDock1.DockWindow(myToolWindow, DockPosition.Left)
If you want to use DocumentWindows you can recreate you methods for example like this:
Private
Sub
AddDockTab()
Dim
myToolWindow
As
New
DocumentWindow
myToolWindow.Name =
"ToolWindow_"
& RadDock1.DockWindows.Count
myToolWindow.Text =
"Onglet n°"
& RadDock1.DockWindows.Count
myToolWindow.DocumentButtons = DocumentStripButtons.None
myToolWindow.CloseAction = DockWindowCloseAction.CloseAndDispose
Dim
myCustomRadScheduler
As
New
CustomControls.AvrScheduler.CustomRadScheduler()
myCustomRadScheduler.Dock = DockStyle.Fill
Dim
myCustomRadSchedulerNavigator
As
New
CustomControls.AvrScheduler.CustomRadSchedulerNavigator()
myCustomRadSchedulerNavigator.Dock = DockStyle.Top
myCustomRadSchedulerNavigator.AssociatedScheduler = myCustomRadScheduler
'Don't change order !
myToolWindow.Controls.Add(myCustomRadScheduler)
myToolWindow.Controls.Add(myCustomRadSchedulerNavigator)
RadDock1.AddDocument(myToolWindow)
End
Sub
Private
Sub
DelDockTab()
For
Each
tDockWindow
As
DocumentWindow
In
RadDock1.DockWindows.DocumentWindows.ToArray()
RadDock1.CloseWindow(tDockWindow)
Next
End
Sub
Also I have noticed that the code samples in our documentation articles are switched, which may have misguided you to the use the AddDocument method. I will fix this and it will appear correctly the next time the documentation is uploaded.
I hope this helps. Should you have any other questions do not hesitate to ask.
Dimitar
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WINFORMS.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
PR
Top achievements
Rank 1
answered on 10 Jan 2014, 10:41 AM
sorry but change ToolWindow in DocumentWindow doesn't work
0
PR
Top achievements
Rank 1
answered on 10 Jan 2014, 11:29 AM
it's ok
the problem was here :
the line needs to be commented and it's ok but i don't know why...
the problem was here :
myToolWindow.AllowedDockState = AllowedDockState.Floating
Or
AllowedDockState.TabbedDocument
0
Accepted
Hello Patrice,
Despite that the close action is set to CloseAndDispose you should also include the Hidden dock state if you want to restrict the states and to be able to remove the documents programmatically:
Also another way to close all document windows is to use the RemoveAllDocumentWindows method:
Please let me know if there is something else I can help you with.
Regards,
Dimitar
Telerik
Despite that the close action is set to CloseAndDispose you should also include the Hidden dock state if you want to restrict the states and to be able to remove the documents programmatically:
myToolWindow.AllowedDockState = AllowedDockState.Floating
Or
AllowedDockState.TabbedDocument
Or
AllowedDockState.Hidden
Also another way to close all document windows is to use the RemoveAllDocumentWindows method:
radDock1.RemoveAllDocumentWindows(DockWindowCloseAction.Close)
Please let me know if there is something else I can help you with.
Dimitar
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WINFORMS.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>