This is a migrated thread and some comments may be shown as answers.

RADDOCK TOOLTABSTRIP

5 Answers 282 Views
Dock
This is a migrated thread and some comments may be shown as answers.
Satyajeet B
Top achievements
Rank 1
Satyajeet B asked on 18 Sep 2009, 08:20 AM
Hi there,

how can i disable close button which is on the right top corner of the toolwindow?
I have tried Caption visible property. But i want the other two button to be visible  and only close button to be disabled.

Thanks,
Satyajeet

5 Answers, 1 is accepted

Sort by
0
Accepted
Nikolay
Telerik team
answered on 18 Sep 2009, 02:32 PM
Hi Satyajeet B,

The CloseButton can be hidden at a ToolWindow level. Please consider using the following code snippet:
toolWindow1.ToolCaptionButtons = ToolStripCaptionButtons.AutoHide | ToolStripCaptionButtons.SystemMenu;  
toolWindow2.ToolCaptionButtons = ToolStripCaptionButtons.AutoHide | ToolStripCaptionButtons.SystemMenu; 

This will show only the AutoHide (pin) button and the dropdown menu button for ToolWindow1 and ToolWindow2. The CloseButton, however, will be hidden.

I hope this helps. If you have additional questions, feel free to contact me.

Greetings,
Nikolay
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Cyril.T
Top achievements
Rank 1
answered on 09 Nov 2009, 01:20 PM
Hello
I do have the same question
I did tried with your method
And it did not work

Here a sample of the code :

            test = !test; 
            Telerik.WinControls.UI.Docking.ToolWindow window = ((frmTest)this.ParentForm).dockPanel; 
            if(test) 
                window.ToolCaptionButtons = Telerik.WinControls.UI.Docking.ToolStripCaptionButtons.AutoHide | Telerik.WinControls.UI.Docking.ToolStripCaptionButtons.SystemMenu; 
            else 
                window.ToolCaptionButtons = Telerik.WinControls.UI.Docking.ToolStripCaptionButtons.AutoHide | Telerik.WinControls.UI.Docking.ToolStripCaptionButtons.SystemMenu | Telerik.WinControls.UI.Docking.ToolStripCaptionButtons.Close; 
 

This is the code I place in the event button of a UserControl.
So every time I press it, it's suppose to show/hide the close button, but nothing happens ...

Any Idea ?
Thx
0
Cyril.T
Top achievements
Rank 1
answered on 09 Nov 2009, 01:54 PM
Ok, I did found out where I'm getting the problem.
I'm using the DockControl method to add directly my userControl and not DockWindow (thi way I have to create a ToolWindow ... Why ???)

Is the any way I can hide the close buton whiout by using DockControl ? (Even if we create a toolwindow, it's not working threw DockControl ...)

Thx
0
AJ
Top achievements
Rank 2
answered on 11 Nov 2009, 03:01 AM

How can we do that at design time?

 


Thanks
AJ
0
Nikolay
Telerik team
answered on 18 Nov 2009, 12:22 AM
Hi AJ,

It is possible to set the ToolCaptionButtons property at desgin-time. Just select the a ToolWindow from the designer and choose the desired option from the property grid. However, please note that you can choose only one of the predefined options, but not a combination of them.

As to your feedback Cyril. T, you are correct. Currently, we have an issue with setting the ToolCaptionButtons property when the DockWindow is a HostWindow. We will address this issue in one of our next releases. For the time begin, please first add a ToolWindow using the DockWindow method and then load the desired content. I am updating your Telerik points for the report.

If you have additional questions, feel free to contact me.

Best wishes,
Nikolay
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Dock
Asked by
Satyajeet B
Top achievements
Rank 1
Answers by
Nikolay
Telerik team
Cyril.T
Top achievements
Rank 1
AJ
Top achievements
Rank 2
Share this question
or