Home All Groups Group Topic Archive Search About

Disappearing Listbox items...

Author
20 Jul 2006 11:25 PM
Kevin
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?

Author
21 Jul 2006 6:46 AM
Cor Ligthert [MVP]
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.MDIParent = me

Cor


Show quoteHide quote
"Kevin" <Kevinp@nospam.cfl.rr.com> schreef in bericht
news:g040c2tpg7f7u216apbego4e35t8ddlgks@4ax.com...
> 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?
Author
21 Jul 2006 9:39 AM
Herfried K. Wagner [MVP]
"Kevin" <Kevinp@nospam.cfl.rr.com> schrieb:
> 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/>
Author
25 Jul 2006 6:39 PM
Kevin
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.at> wrote:

Show quoteHide quote
>"Kevin" <Kevinp@nospam.cfl.rr.com> schrieb:
>> I'm using an ActiveX Listbox control in my Windows Forms program.
>
>I am curious why you are not using .NET's listbox control.
Author
25 Jul 2006 6:41 PM
Kevin
....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.at> wrote:

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