@@ -124,22 +124,35 @@ private void CreateDesignSurface(int n)
124124 // - create some Controls at DesignTime
125125 TextBox t1 = surface . CreateControl < TextBox > ( new Size ( 200 , 23 ) , new Point ( 172 , 12 ) ) ;
126126 Button b1 = surface . CreateControl < Button > ( new Size ( 200 , 40 ) , new Point ( 172 , 63 ) ) ;
127- CustomButton b2 = surface . CreateControl < CustomButton > ( new Size ( 200 , 40 ) , new Point ( 100 , 200 ) ) ;
127+ CustomButton b2 = surface . CreateControl < CustomButton > ( new Size ( 200 , 40 ) , new Point ( 172 , 200 ) ) ;
128128 b1 . Text = "I'm the first Button" ;
129129 b2 . Text = "I'm the second Button" ;
130130 b1 . BackColor = Color . LightGray ;
131131 b2 . BackColor = Color . LightGreen ;
132132
133- RadioButton rb1 = surface . CreateControl < RadioButton > ( new Size ( 120 , 22 ) , new Point ( 12 , 21 ) ) ;
133+ RadioButton rb1 = surface . CreateControl < RadioButton > ( new Size ( 120 , 22 ) , new Point ( 12 , 10 ) ) ;
134134 rb1 . Text = "Check me!" ;
135- RadioButton rb2 = surface . CreateControl < RadioButton > ( new Size ( 120 , 22 ) , new Point ( 12 , 50 ) ) ;
135+ RadioButton rb2 = surface . CreateControl < RadioButton > ( new Size ( 120 , 22 ) , new Point ( 12 , 35 ) ) ;
136136 rb2 . Text = "No, check me!" ;
137137 rb2 . Checked = true ;
138138
139- Panel pnl = surface . CreateControl < Panel > ( new Size ( 130 , 100 ) , new Point ( 12 , 21 ) ) ;
139+ CheckBox checkbox1 = surface . CreateControl < CheckBox > ( new Size ( 120 , 22 ) , new Point ( 12 , 60 ) ) ;
140+ checkbox1 . Text = "I'm Unchecked!" ;
141+ CheckBox checkbox2 = surface . CreateControl < CheckBox > ( new Size ( 120 , 22 ) , new Point ( 12 , 85 ) ) ;
142+ checkbox2 . Text = "I'm Indeterminate!" ;
143+ checkbox2 . AutoSize = true ;
144+ checkbox2 . CheckState = CheckState . Indeterminate ;
145+ CheckBox checkbox3 = surface . CreateControl < CheckBox > ( new Size ( 120 , 22 ) , new Point ( 12 , 110 ) ) ;
146+ checkbox3 . Text = "I'm Checked!" ;
147+ checkbox3 . CheckState = CheckState . Checked ;
148+
149+ Panel pnl = surface . CreateControl < Panel > ( new Size ( 140 , 140 ) , new Point ( 12 , 12 ) ) ;
140150 pnl . BackColor = Color . Aquamarine ;
141151 rb1 . Parent = pnl ;
142152 rb2 . Parent = pnl ;
153+ checkbox1 . Parent = pnl ;
154+ checkbox2 . Parent = pnl ;
155+ checkbox3 . Parent = pnl ;
143156
144157 Label l1 = surface . CreateControl < Label > ( new Size ( 100 , 25 ) , new Point ( 12 , 12 ) ) ;
145158 Label l2 = surface . CreateControl < Label > ( new Size ( 120 , 25 ) , new Point ( 12 , 12 ) ) ;
@@ -154,7 +167,7 @@ private void CreateDesignSurface(int n)
154167 l1 . Parent = sct . Panel1 ;
155168 l2 . Parent = sct . Panel2 ;
156169
157- PictureBox pb1 = surface . CreateControl < PictureBox > ( new Size ( 64 , 64 ) , new Point ( 24 , 166 ) ) ;
170+ PictureBox pb1 = surface . CreateControl < PictureBox > ( new Size ( 64 , 64 ) , new Point ( 12 , 176 ) ) ;
158171 pb1 . Image = new Icon ( "painter.ico" ) . ToBitmap ( ) ;
159172
160173 ContextMenuStrip cm1 = surface . CreateComponent < ContextMenuStrip > ( ) ;
@@ -333,7 +346,7 @@ private void CreateDesignSurface(int n)
333346 splitter . BackColor = Color . Green ;
334347 splitter . Dock = DockStyle . Bottom ;
335348
336- Panel panel = surface . CreateControl < Panel > ( new ( 0 , tabPage6 . Height / 2 ) , new ( 0 , 0 ) ) ;
349+ Panel panel = surface . CreateControl < Panel > ( new ( 0 , tabPage6 . Height / 2 ) , new ( 0 , 0 ) ) ;
337350 panel . Dock = DockStyle . Bottom ;
338351 NumericUpDown numericUpDown = surface . CreateControl < NumericUpDown > ( new ( 50 , 10 ) , new ( 10 , 10 ) ) ;
339352 panel . Controls . Add ( numericUpDown ) ;
0 commit comments