How to make the Horizonatl scroll bar show up

DockableWindow/TabStripPanel for Windows Forms Forum

The latest build of this product (v2.0.0208) was released 19 years ago, which was before this thread was created.
Posted 18 years ago by Yongwu Zhao
Avatar
In the example DockableWindow-TestApplication-CSharp,
Could anybody tell me how to make the Horizonatl scroll bar show up
in the Sample.txt window?

Thanks

Comments (3)

Posted 18 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Probably just turn off word wrapping on the TextBox control.


Actipro Software Support

Posted 18 years ago by Yongwu Zhao
Avatar
I still don't understand. I think the code below create the window.

private DWDocumentWindow CreateTextDocument(string fileName, string text) {
// Create a textbox for the document
TextBox textBox = new TextBox();
textBox.Multiline = true;
// textBox.Font = new Font("Courier New", 10);
textBox.BorderStyle = BorderStyle.Fixed3D;
textBox.ScrollBars = ScrollBars.Both;

// If no data was passed in, generate some
if (fileName == null) {
if (dwManager.Documents.Count <= 1) {
text = "Try these steps to see some of DockableWindow's features:\r\n\r\n" +
"Click on a tool window caption pin button. The tool window is placed in auto-hide mode. When you hover over the auto-hide tab for the tool window, it slides out into view. Click somewhere outside the tool window or press Escape to dismiss it.\r\n\r\n" +
"Hover the mouse over tabs in the document area. Customized ToolTips are made by handling the GetToolTipText event.\r\n\r\n" +
"Drag a document to the bottom of the document area and drop to create a new tab group. Right-click on the tab to see menu options that allow you to manage document tabs among groups.\r\n\r\n" +
"Right-click on a docked tool window and select the Dockable menu item. The tool window is placed in the document area.\r\n\r\n" +
"\r\n\r\n";
fileName = "Sample.txt";
}
else {
Guid guid = Guid.NewGuid();
string guidString = guid.ToString().Substring(guid.ToString().Length - 8);
text = "This is a new document, created at " + DateTime.Now.ToString() + ".";
fileName = "Document_" + guidString + ".cs";
}
}

// Create the document
textBox.Text = text;
DWDocumentWindow documentWindow = dwManager.CreateDocumentWindow(fileName, Path.GetFileName(fileName), 8, textBox);

return documentWindow;
Posted 18 years ago by Yongwu Zhao
Avatar
I got it