| re: ListView on Tab Control - a workaround
Hi Tom,
I have another alternative, which also utilizes the tab change event.
Simply make the control invisible by default. Make it visible only when its
tab page is visible, i.e in the tab change event:
me.lstListview.visible = (me.tabMyTab= page_with_listview)
Perhaps not anymore effective, but as a developer I personally do not like
the timer event.
Just another alternative.
Also, I have found that this problem exists only with certain versions of
the listview control. I'm at home, so I cannot give you a version number
that works, but at work we find an earlier version of mscomclt has no
problems, a later version exhibits the "out of position" problem. We just
make sure everyone has the earlier control registered. Since 99% of our apps
are used "inhouse" this is not a problem.
"tom" <tom@nuws.com> wrote in message
news:c17f6324.0310131229.3b210085@posting.google.c om...[color=blue]
> Hey All-
>
> For those of you having troubles with listviews appearing in the
> wrong position when on a tab control, we've come up w/one other
> workaround that may be useful.
>
> When you move to the tab page containing the listview (tab's
> onChange event), fire off your form timer by setting the timer
> interval (me.timerinterval = 1)
>
> Then, in the event code for form timer have the following:
>
> ================================================== =
> Private Sub Form_Timer()
> On Error Resume Next
> Me.TimerInterval = 0
> DoCmd.MoveSize , , Me.WindowWidth + 10, Me.WindowHeight
> DoCmd.MoveSize , , Me.WindowWidth - 10, Me.WindowHeight
> End Sub
> ================================================== =
>
> This will make the listView go to where you've put it, and not
> showup in the upper left-hand corner.
>
> -td[/color] |