第8章Windows窗体应用程序设计课程.pptVIP

  • 40
  • 0
  • 约2.3万字
  • 约 10页
  • 2017-03-15 发布于江苏
  • 举报
布局属性 样式属性 外观样式 Font常用属性 行为属性 窗体常用事件 窗体常用方法 RichTextBox文本格式设置 RichTextBox.SelectionBullet 属性 获取或设置一个值,通过该值指示项目符号样式是否应用到当前选定内容或插入点。如果未选定任何文本,则项目符号样式应用到当前插入点和用户在此插入点后输入的所有段落。项目符号样式一直应用到控件的文本,直到移动插入点或当用户在空项目符号项上按 Enter 键时为止。 如果设置此属性后在控件内选定了文本,则选定文本内的所有段落都转换为项目符号列表中的项目符号项。可以使用此属性在SelectionBullet控件中创建的文档内创建项目符号列表。 SelectionBullet属性使您得以指定要应用的项目符号和项目符号项的文本之间的缩进量。 SelectionBullet 属性与 SelectionFont、SelectedText 和 SelectionColor 属性一起使用,以在 RichTextBox 控件中创建一个项目符号列表 richTextBox1.Clear ; // Set the font for the opening text to a larger Arial font; richTextBox1.SelectionFont new Font Arial, 16 ; // Assign the introduction text to the RichTextBox control. richTextBox1.SelectedText The following is a list of bulleted items: + \n; // Set the Font for the first item to a smaller size Arial font. richTextBox1.SelectionFont new Font Arial, 12 ; // Specify that the following items are to be added to a bulleted list. richTextBox1.SelectionBullet true; // Set the color of the item text. richTextBox1.SelectionColor Color.Red; // Assign the text to the bulleted item. richTextBox1.SelectedText Apples + \n; RichTextBox文本缩进 SelectionIndent 属性获取或设置所选内容开始行的缩进距离(以像素为单位)。 SelectionHangingIndent 属性 SelectionRightIndent 属性 RichTextBox超链接 RichTextBox.DetectUrls 属性 获取或设置一个值,通过该值指示当在控件中键入某个统一资源定位器 URL 时,RichTextBox 是否自动设置 URL 的格式。 LinkClicked 事件当用户在控件文本内的链接上单击时发生。 Process.Start e.LinkText ; Process.Start 方法 String fileName 要在进程中运行的文档或应用程序文件的名称。 Process.Start Environment.GetFolderPath Environment.SpecialFolder.ProgramFiles ; Process.Start IExplore.exe ; Process.Start ; Process.Start wordpad.exe,C:\\文档.rtf ; String.Format 方法 String, Object 将指定的 String 中的格式项替换为指定的 Object 实例的值的文本等效项。 s String.Format C Currency: . . . 0:C \n + D Decimal:. . . . 0:D \n + E Scientific: . . 1:E \n + F Fixed point:. . 1:F \n + G General:. . . . 0:G \n + default :. . . 0 default G \n + N Number: . . . . 0:N \n + P Percent:. . . . 1:P \n + R Rou

文档评论(0)

1亿VIP精品文档

相关文档