积极答复者
我的工具箱中没有richText,只有richTextBox.我找到的程序中有richText

问题
答案
-
这里的richText只是个成员域,是RichTextBox类型,也就是RichTextBox控件。
工具箱中当然不会有richText。
概念混淆!
- 已标记为答案 肖小勇Moderator 2011年3月3日 16:25
-
你好
根据你的代码,这是RichTextBox,没有richText控件。richText只是RichTextBox的一个对象名称。所以你可以在后台使用这个RichTextBox对象,也就是richText。
希望对你有所帮助。
Cookie Luo[MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
- 已标记为答案 肖小勇Moderator 2011年3月3日 16:26
全部回复
-
那个 RichText 应该是您打开的项目中自定义的控件 (Custom Control/User Control),所有继承 Component 类的类型,都会被作为工具箱的控件,显示在一个单独的类别中。
另外,项目中如果引用了其他包含控件的程序集,这时,您可以把该程序集中包含的控件放到工具箱中。
Mark Zhou- 已建议为答案 JiyuanModerator 2011年2月28日 10:06
-
public class Form1 : System.Windows.Forms.Form
{
private System.Windows.Forms.MainMenu mainMenu1;
private System.Windows.Forms.OpenFileDialog openFileDialog1;
private System.Windows.Forms.SaveFileDialog saveFileDialog1;
private System.Windows.Forms.FontDialog fontDialog1;
private System.Windows.Forms.ColorDialog colorDialog1;
private System.Windows.Forms.PrintDialog printDialog1;
private System.Drawing.Printing.PrintDocument printDocument1;
private System.Windows.Forms.PrintPreviewDialog printPreviewDialog1;
private System.Windows.Forms.MenuItem menuItem1;
private System.Windows.Forms.MenuItem menuItem2;
private System.Windows.Forms.MenuItem menuItem3;
private System.Windows.Forms.MenuItem menuItem4;
private System.Windows.Forms.MenuItem menuItem5;
private System.Windows.Forms.MenuItem menuItem6;
private System.Windows.Forms.MenuItem menuItem7;
private System.Windows.Forms.MenuItem menuItem8;
private System.Windows.Forms.MenuItem menuItem9;
private System.Windows.Forms.MenuItem menuItem10;
private System.Windows.Forms.MenuItem menuItem11;
private System.Windows.Forms.MenuItem menuItem12;
private System.Windows.Forms.MenuItem menuItem13;
private System.Windows.Forms.MenuItem menuItem14;
private System.Windows.Forms.MenuItem menuItem15;
private System.Windows.Forms.MenuItem menuItem16;
private System.Windows.Forms.MenuItem menuItem17;
private System.Windows.Forms.MenuItem menuItem18;
private System.Windows.Forms.MenuItem menuItem19;
private System.Windows.Forms.MenuItem menuItem20;
private System.Windows.Forms.MenuItem menuItem21;
private System.Windows.Forms.MenuItem menuItem22;
private System.Windows.Forms.MenuItem menuItem23;
private System.Windows.Forms.MenuItem menuItem24;
public System.Windows.Forms.RichTextBox richText; 找到一处,是否是这里定义了?
private System.Windows.Forms.MenuItem menuItem25;
private System.Windows.Forms.MenuItem menuItem26;
private IContainer components; -
这里的richText只是个成员域,是RichTextBox类型,也就是RichTextBox控件。
工具箱中当然不会有richText。
概念混淆!
- 已标记为答案 肖小勇Moderator 2011年3月3日 16:25
-
你好
根据你的代码,这是RichTextBox,没有richText控件。richText只是RichTextBox的一个对象名称。所以你可以在后台使用这个RichTextBox对象,也就是richText。
希望对你有所帮助。
Cookie Luo[MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
- 已标记为答案 肖小勇Moderator 2011年3月3日 16:26