locked
groupBox not getting displayed RRS feed

  • Question

  • I'm trying to display a groupBox but it doesn't show up on the form.

    "Enabled" and "Visible" properties are set to true and there is no issue of "Anchor"

    as well.If I add another control in the groupBox then a NullReferenceException occurs on the newly added control.In Other words, the groupBox isn't getting displayed and it throws an exception whenever I add another control (other than the already existing ones) on the form.

     

    Can anyone explain what the problem might be? 

    Wednesday, July 4, 2007 6:21 AM

Answers

  • Sounds like a completly broken .net environment - I would suggest uninstalling visual studio and re-installing it.

     

    Ross

    Tuesday, July 10, 2007 7:43 PM

All replies

  • Try deleting it and adding a new one... sound like a broken reference somewhere.

     

    Ross

    Wednesday, July 4, 2007 7:26 AM
  • I've tried that but its still the same problem.Even renaming the control ain't helping.
    Wednesday, July 4, 2007 7:41 AM
  • Try opening a new project and adding it to that - if that works it would look like a missing reference - if it still doesnt work it would look like a broken .net environment.

     

    Ross

    Wednesday, July 4, 2007 7:51 AM
  • Hi Ross,

    I tried adding it to a new project ...it shows a missing reference as u said...I still don't know what to

     do as it isn't getting displayed on the original form.

    Thursday, July 5, 2007 10:22 AM
  • I'm guessing you created the GB yourself at run-time.  Did you call this.Controls.Add() to add it to the form?  If that doesn't help, please post your code, we don't have enough info to help you.
    Thursday, July 5, 2007 1:04 PM
  • Sounds like a completly broken .net environment - I would suggest uninstalling visual studio and re-installing it.

     

    Ross

    Tuesday, July 10, 2007 7:43 PM