Disappearing Listbox items...

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Kevin

    #1

    Disappearing Listbox items...

    I'm using an ActiveX Listbox control in my Windows Forms program. I
    can load the listbox and have it work fine on one of my forms. But
    when I add the line:

    Me.MDIParent = frmMain

    the form appears with the items invisible. The scrollbar shows that
    the items are in the listbox--I just can't see any of them.

    If I comment out the above line, the items appear normally.

    Has anyone else experienced this bug?
  • Cor Ligthert [MVP]

    #2
    Re: Disappearing Listbox items...

    Kevin,

    I think that few people can trace this this problem.

    In my idea is normal code to create a mdichild from a mdiform by

    dim mychild as new whateverform
    mychild.MDIPare nt = me

    Cor


    "Kevin" <Kevinp@nospam. cfl.rr.comschre ef in bericht
    news:g040c2tpg7 f7u216apbego4e3 5t8ddlgks@4ax.c om...
    I'm using an ActiveX Listbox control in my Windows Forms program. I
    can load the listbox and have it work fine on one of my forms. But
    when I add the line:
    >
    Me.MDIParent = frmMain
    >
    the form appears with the items invisible. The scrollbar shows that
    the items are in the listbox--I just can't see any of them.
    >
    If I comment out the above line, the items appear normally.
    >
    Has anyone else experienced this bug?

    Comment

    • Herfried K. Wagner [MVP]

      #3
      Re: Disappearing Listbox items...

      "Kevin" <Kevinp@nospam. cfl.rr.comschri eb:
      I'm using an ActiveX Listbox control in my Windows Forms program.
      I am curious why you are not using .NET's listbox control.

      --
      M S Herfried K. Wagner
      M V P <URL:http://dotnet.mvps.org/>
      V B <URL:http://classicvb.org/petition/>

      Comment

      • Kevin

        #4
        Re: Disappearing Listbox items... - Disappearing Items.jpg (0/1)

        Because I need to be able to change the background color of each
        individual item.

        I tried using the Listview control and I get the same problem only
        this time it doesn't matter if the form is a child form.

        The scrollbar shows the items are there, they're just not visible (see
        attached picture).



        On Fri, 21 Jul 2006 11:39:49 +0200, "Herfried K. Wagner [MVP]"
        <hirf-spam-me-here@gmx.atwrot e:
        >"Kevin" <Kevinp@nospam. cfl.rr.comschri eb:
        >I'm using an ActiveX Listbox control in my Windows Forms program.
        >
        >I am curious why you are not using .NET's listbox control.

        Comment

        • Kevin

          #5
          Re: Disappearing Listbox items...

          ....I meant also that I need checkboxes. I'd like to use the
          CheckedListbox control, but I need to be able to change the background
          color of each item. I know I can do that with an "owner drawn"
          listbox, but the checkedlistbox doesn't support this.


          On Fri, 21 Jul 2006 11:39:49 +0200, "Herfried K. Wagner [MVP]"
          <hirf-spam-me-here@gmx.atwrot e:
          >"Kevin" <Kevinp@nospam. cfl.rr.comschri eb:
          >I'm using an ActiveX Listbox control in my Windows Forms program.
          >
          >I am curious why you are not using .NET's listbox control.

          Comment

          Working...