We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Locking a Tabbed MDI window

Thread ID:

Created:

Updated:

Platform:

Replies:

2350 Jan 10,2003 12:30 PM Jul 28,2003 01:48 PM Windows Forms 13
loading
Tags: Tools
James Cline
Asked On January 10, 2003 12:30 PM

Is there a way to lock a Tabbed MDI Child window so that it cannot be moved? What I am looking for is the ability to always keep a certain window as the left most Tabbed Window, regardless of the postions of the other tabbed windows. Thanks, Jim

Ramesh Praveen [Syncfusion]
Replied On January 13, 2003 08:32 AM

Jim, I will make this a feature request for our next release. We will provide a mechanism where you could implement a certain interface in the corresponding MDI Child and control it's positioning in the tab, right there. Regards, Praveen Ramesh

James Cline
Replied On March 13, 2003 11:48 AM

I implemented the ITabbedMDIChildForm interface and set the AllowUserDrag to false. This does prevent the tab from being dragged from one group to another but it still allows the tab to be reordered in the same group. Is there a way to prevent it from being able to move at all? Thanks, Jim > Jim, > > I will make this a feature request for our next release. We will provide a mechanism where you could implement a certain interface in the corresponding MDI Child and control it's positioning in the tab, right there. > > Regards, > Praveen Ramesh >

James Cline
Replied On March 13, 2003 11:48 AM

I implemented the ITabbedMDIChildForm interface and set the AllowUserDrag to false. This does prevent the tab from being dragged from one group to another but it still allows the tab to be reordered in the same group. Is there a way to prevent it from being able to move at all? Thanks, Jim > Jim, > > I will make this a feature request for our next release. We will provide a mechanism where you could implement a certain interface in the corresponding MDI Child and control it's positioning in the tab, right there. > > Regards, > Praveen Ramesh >

James Cline
Replied On March 13, 2003 12:56 PM

Also, I've found a bug with the AllowUserDrag. If this is implemented on a form, you can still drag to a new group with the following steps: 1. create 3 tabbed documents. (one has to implement the ITabbedMDIChildForm interface with AllowUserDrag = false ) 2. Take one of the drag enabled MDI tabbed forms to a new horizontal group. 3. Now drag the MDI form that implements ITabbedMDIChildForm to a new positon in its own group and then back to its orignal spot and then down to the the second group without ever releasing the button. 4. MDI Tab is moved to the new group. -Jim

Ramesh Praveen [Syncfusion]
Replied On March 13, 2003 01:25 PM

Jim, 1) Regarding ablity to move the tabs within a group when AllowUserDrag is false, that was the intention. Whereas the AllowUserDrag is a setting specific to the tabpage, the ability to move the tabs within the tabpage is a property of the tab control used in the tab group. We use a TabControlExt in the tab groups and it's UserMoveTabs property is set to true by default. You can access and customize the tab control as noted in this KB: http://www.syncfusion.com/KB/Tools/Tools_c30c.asp#q531q 2) I am not able to reproduce the drag bug you mention here. What version are you using? Regards, Praveen Ramesh

James Cline
Replied On March 14, 2003 05:33 AM

1) Won't UserMoveTabs prevent all the tabs from being moved? I would like to be able to lock down just one tab, sort of like a Home page. So that it cannot be closed, moved, or rearranged in the tab control. I was looking for an event that would allow me to know when that tab page's postion was going to be changed then I could cancel the move. Is there anything like that in the TabControlEx? 2) I am using 1.5.1.6. I will try to duplicate on the sample app when I get a chance. > Jim, > > 1) Regarding ablity to move the tabs within a group when AllowUserDrag is false, that was the intention. Whereas the AllowUserDrag is a setting specific to the tabpage, the ability to move the tabs within the tabpage is a property of the tab control used in the tab group. > > We use a TabControlExt in the tab groups and it's UserMoveTabs property is set to true by default. You can access and customize the tab control as noted in this KB: > http://www.syncfusion.com/KB/Tools/Tools_c30c.asp#q531q > > 2) I am not able to reproduce the drag bug you mention here. What version are you using? > > Regards, > Praveen Ramesh >

Ramesh Praveen [Syncfusion]
Replied On March 14, 2003 07:43 AM

Jim, Though we can allow preventing moving a certain tab in our tab control, other tabs could be moved before/after it, which makes it moot to disable dragging a single tab. Regards, -Praveen

James Cline
Replied On March 14, 2003 12:33 PM

Could it be made to remove a tab from participating in the tab moving logic so that it is considered fixed? Or at least expose events like BeforeTabMove and provide a way to cancel the move. I don't know how it is implemented but it seems like there should be a place that an event could be fired that would allow the behavior to be modified. Even if I had to implement the code to prevent the move, I would as long as I had the events to attach to. Anything would help... Thanks.. > Jim, > > Though we can allow preventing moving a certain tab in our tab control, other tabs could be moved before/after it, which makes it moot to disable dragging a single tab. > > Regards, > -Praveen

Ramesh Praveen [Syncfusion]
Replied On March 17, 2003 07:07 AM

Jim, Yes, we could provide a BeforeTabMove event where you could cancel the move. We will try to include this in our next version. Regards, Praveen Ramehs

Administrator [Syncfusion]
Replied On July 17, 2003 09:15 AM

I have managed to keep a Summary TabPage as the left most tab while allowing the tabpages to be moved. In the SelectedIndexChanged of the TabControlExt control - I check if the TabPage at TabPages(0) is my Summary Tabpage - if not I remove the summary Tabpage and insert it at index 0. If Not Me.TabControlExt1.TabPages(0) Is TabPageSummary Then Me.TabControlExt1.TabPages.Remove(TabPageSummary) Me.TabControlExt1.TabPages.Insert(0, TabPageSummary) End If hope this helps! > Is there a way to lock a Tabbed MDI Child window so that it cannot be moved? What I am looking for is the ability to always keep a certain window as the left most Tabbed Window, regardless of the postions of the other tabbed windows. > > Thanks, > Jim >

Ramesh Praveen [Syncfusion]
Replied On July 17, 2003 02:13 PM

Thanks for the update. -Praveen

James Cline
Replied On July 21, 2003 07:18 AM

This looks like it would work great for me except the TabbedMDIManager doesn't expose the needed evetns and methods. I assume that it uses a tab control somewhere in the implementation of the TabbedMDI but I can't seem to be able to get to it... > I have managed to keep a Summary TabPage as the left most tab while allowing the tabpages to be moved. In the SelectedIndexChanged of the TabControlExt control - I check if the TabPage at TabPages(0) is my Summary Tabpage - if not I remove the summary Tabpage and insert it at index 0. > > If Not Me.TabControlExt1.TabPages(0) Is TabPageSummary Then > Me.TabControlExt1.TabPages.Remove(TabPageSummary) > Me.TabControlExt1.TabPages.Insert(0, TabPageSummary) > End If > > > hope this helps! > > > Is there a way to lock a Tabbed MDI Child window so that it cannot be moved? What I am looking for is the ability to always keep a certain window as the left most Tabbed Window, regardless of the postions of the other tabbed windows. > > > > Thanks, > > Jim > > >

Ramesh Praveen [Syncfusion]
Replied On July 28, 2003 01:48 PM

Jim, This might help: http://www.syncfusion.com/KB/Tools/Tools_c30c.asp#q531q -Praveen

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;