I've been trying to get my app better organized using Container Controls.
Ran into a little problem so I created an example trying to isolate the issue.
I have this listbox. In the Open Event I have this code. Works fine, populating the headers.
Me.HasHeading=True Me.ColumnsResizable = True Me.textsize =12 Me.ColumnCount =10 Me.ColumnWidths="10%,10%,10%,10%,10%,10%,10%,10%,10%,10%" Me.Heading(0)="One" Me.Heading(1)="Two" Me.Heading(2)="Three" Me.Heading(3)="Four" Me.Heading(4)="Five" Me.Heading(5)="Six" Me.Heading(6)="Seven" Me.Heading(7)="Eight" Me.Heading(8)="Nine" Me.Heading(9)="Ten" Beep
Then I create a Container Control. Cut the Listbox out of the main Window and paste it into the Container control. Looks good. The Open Event code (above) was copied as expected. Then place the Container, (with the listbox) onto the Main Window. But now when I run the app, the headers don't show up. I believe the app is executing the Open Event because I hear the beep at the end. But no headers. Any idea why this is not working?
I tried putting the above header code in the Open Event of the Container, (with full references instead of using me prefix) but that didn't work either. I even place the code in a button. Still, the beep goes off but the header don't not get populated.