code_junkie

VS2008 Windows Form Designer does not like my control

Nov 12th, 2011
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.68 KB | None | 0 0
  1. public partial class MYControl : MyControlBase
  2. {
  3. public string InnerText {
  4. get { return textBox1.Text; }
  5. set { textBox1.Text = value; }
  6. }
  7. public MYControl()
  8. {
  9. InitializeComponent();
  10. }
  11. }
  12.  
  13. partial class MYControl
  14. {
  15. /// <summary>
  16. /// Required designer variable.
  17. /// </summary>
  18. private System.ComponentModel.IContainer components = null;
  19.  
  20. /// <summary>
  21. /// Clean up any resources being used.
  22. /// </summary>
  23. /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
  24. protected override void Dispose(bool disposing)
  25. {
  26. if (disposing && (components != null))
  27. {
  28. components.Dispose();
  29. }
  30. base.Dispose(disposing);
  31. }
  32.  
  33. #region Component Designer generated code
  34.  
  35. /// <summary>
  36. /// Required method for Designer support - do not modify
  37. /// the contents of this method with the code editor.
  38. /// </summary>
  39. private void InitializeComponent()
  40. {
  41. this.textBox1 = new System.Windows.Forms.TextBox();
  42. this.listBox1 = new System.Windows.Forms.ListBox();
  43. this.label1 = new System.Windows.Forms.Label();
  44. this.SuspendLayout();
  45. //
  46. // textBox1
  47. //
  48. this.textBox1.Location = new System.Drawing.Point(28, 61);
  49. this.textBox1.Name = "textBox1";
  50. this.textBox1.Size = new System.Drawing.Size(100, 20);
  51. this.textBox1.TabIndex = 0;
  52. //
  53. // listBox1
  54. //
  55. this.listBox1.FormattingEnabled = true;
  56. this.listBox1.Location = new System.Drawing.Point(7, 106);
  57. this.listBox1.Name = "listBox1";
  58. this.listBox1.Size = new System.Drawing.Size(120, 95);
  59. this.listBox1.TabIndex = 1;
  60. //
  61. // label1
  62. //
  63. this.label1.AutoSize = true;
  64. this.label1.Location = new System.Drawing.Point(91, 42);
  65. this.label1.Name = "label1";
  66. this.label1.Size = new System.Drawing.Size(35, 13);
  67. this.label1.TabIndex = 2;
  68. this.label1.Text = "label1";
  69. //
  70. // MYControl
  71. //
  72. this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
  73. this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
  74. this.Controls.Add(this.label1);
  75. this.Controls.Add(this.listBox1);
  76. this.Controls.Add(this.textBox1);
  77. this.Name = "MYControl";
  78. this.Size = new System.Drawing.Size(135, 214);
  79. this.ResumeLayout(false);
  80. this.PerformLayout();
  81.  
  82. }
  83.  
  84. #endregion
  85.  
  86.  
  87. private System.Windows.Forms.Label label1;
  88. }
  89.  
  90. protected System.Windows.Forms.TextBox textbox1;
  91. protected System.Windows.Forms.ListBox listbox1;
Add Comment
Please, Sign In to add comment