Setting the size of the MDITab text area
How can I restrict the size of the text area for MDI tab text. I want to achieve the same effect as in Visual Studio where long names are dotted and the tooltip provides the full name. For example, I want the tab text to display:
"My Docum...\fred.txt"
whereas the full text value is actually:
"My Documents\fred.txt"
SIGN IN To post a reply.
3 Replies
AD
Administrator
Syncfusion Team
August 5, 2004 05:24 PM UTC
Hi,
Please note that in VS.Net only the docking windows arranged in a tabbed group display this behavior and not the MDI Tabs. Refer to the screenshot attached that illustrates this.
Our docking windows and tabbedMDI frameworks are closely modelled on the VS.Net''s frameworks and hence we have maintained similar behavior for consistency purposes.
Please let us know if you have any suggestions in this regard. We appreciate your interest in Syncfusion products.
Regards,
Guru Patwal
Syncfusion, Inc.
DS
Derek Stafford
August 6, 2004 10:26 AM UTC
Hmm. Well the MDI tabs in my Visual Studio seem to have this behaviour (see attached screenshot).
Clip1_1838.zip
AD
Administrator
Syncfusion Team
August 9, 2004 04:15 PM UTC
Hi Horeslover,
Thanks for the screenshot. I could observe such a behavior in the VS.Net''s MDI tabs which were created by transforming a docking window into MDI child form (by unchecking Dockable in the docking window''s context-menu).
Such a feature is not supported directly in the TabbedMDI framework since the text formatting behavior is contextual, i.e., the number of dots that have to be placed in between so as to create meaningful text on the MDI tabs.
You could try the following workaround :
Implement the ITabbedMDIChildForm interface in each of the MDI child forms
public class MdiChildForm : System.Windows.Forms.Form, ITabbedMDIChildForm
{
:
:
:
public void OnAttachTabbedMDI(TabbedMDIManager manager)
{
}
public void OnDetachTabbedMDI(TabbedMDIManager manager)
{
}
public void OnTabContextMenuPopup(ParentBarItem contextMenuParentItem)
{
}
public void OnTabContextMenuClosed(ParentBarItem contextMenuParentItem)
{
}
public bool AllowUserDrag
{
get
{
return true;
}
}
public void OnMdiChildAddedToTabHost(TabHost tabHost, int tabIndex)
{
}
public string GetCustomTabText(out bool validValueReturned)
{
string str;
validValueReturned = true;
// Check the text length and set the desired short form
if (this.Text.Length > 25)
str = ""C:\\...\\Essential Suite";
else
str = "C:\\Program Files\\Essential Suite";
return str;
}
}
Please let me know if this meets your requirements. We appreciate your interest in Syncfusion products.
Regards,
Guru Patwal
Syncfusion, Inc.
SIGN IN To post a reply.
- 3 Replies
- 2 Participants
-
DS Derek Stafford
- Aug 5, 2004 12:11 PM UTC
- Aug 9, 2004 04:15 PM UTC