PC Review
Forums
Newsgroups
Microsoft DotNet
Microsoft Dot NET Framework Forms
TextBox Mutiline&VerticalScrollBar
Forums
Newsgroups
Microsoft DotNet
Microsoft Dot NET Framework Forms
TextBox Mutiline&VerticalScrollBar
![]() |
TextBox Mutiline&VerticalScrollBar |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
Hi, all;
I create a textbox and set the mutiline porperty as true; and set scrollbars as ScrollBars.Vertical; But I can not see the VerticalScroll bar? why? I use compactFramework, it says it supports two porperty this is my source: using System; using System.Drawing; using System.Collections; using System.Windows.Forms; using System.ComponentModel; using System.Data; namespace SmartDeviceApplication2 { /// <summary> /// Summary description for Form1. /// </summary> public class Form1 : System.Windows.Forms.Form { private System.Windows.Forms.MainMenu mainMenu1; public Form1() { // // Required for Windows Form Designer support // InitializeComponent(); // Create an instance of a TextBox control. TextBox textBox1 = new TextBox(); // Set the Multiline property to true. textBox1.Multiline = true; // Add vertical scroll bars to the TextBox control. textBox1.ScrollBars = ScrollBars.Vertical; // Allow the RETURN key to be entered in the TextBox control. textBox1.AcceptsReturn = true; // Allow the TAB key to be entered in the TextBox control. textBox1.AcceptsTab = true; // Set WordWrap to True to allow text to wrap to the next line. textBox1.WordWrap = true; // Set the default text of the control. textBox1.Text = "Welcome!"; this.Controls.Add(textBox1); // TODO: Add any constructor code after InitializeComponent call // } /// <summary> /// Clean up any resources being used. /// </summary> protected override void Dispose( bool disposing ) { base.Dispose( disposing ); } #region Windows Form Designer generated code /// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.mainMenu1 = new System.Windows.Forms.MainMenu(); // // Form1 // this.Menu = this.mainMenu1; this.Text = "Form1"; } #endregion /// <summary> /// The main entry point for the application. /// </summary> static void Main() { Application.Run(new Form1()); } } } |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 

