views:

49

answers:

3

In vb.net I have control named checkbox1 that I can see at dropdown menu in properties tab. but in designer I am not able to locate it...

Also when I am selecting CheckBox1 from properties' dropdown menu, no checkbox in designer gets highlighted....

How to find that control in designer?

pls help me....

+2  A: 

When you select the checkbox from the dropdown, look at its properties- is Visible set to false? Also look at the z-order, it might be hiding behind another control.

Dave Swersky
+2  A: 

Select it in the property window, change it's location to 0,0, size to 100,100, and make sure it's got some .Text property assigned.

(ASP.Net or WinForms designer?)

hometoast
+1  A: 

Your control might be hidden due to various reasons (some of them are bugs in the designer's behaviour).

It might be that the control has a size of (0,0), it might be behind some other control, it might have some off-display location such as (-10,-10), etc.

You can try playing around with the Size and Location properties of the control to try and reveal it, but if that fails you may want to do it the ugly way:

  1. cut checkbox1's significant code (if any) from the form designer's code (the Form1.Designer.vb file).
  2. add a new checkbox control to the form using the designer.
  3. change the name of that new checkbox to checkbox1.
  4. paste the significant code you've cut instead of the respective code in checkbox1's designer code.
  5. make sure everything went smoothly (event handlers and other automatically-generated code might be affected).
M.A. Hanin