Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I have a tab control on a form with three tabs each tab has three list views on them. They are but as an array at runtime. Everything is working well. The I built a sub that will load the last saved data into each list view. when I do this everything goes well until the sub is finished. then on two of the tabs all of the listviews are gone. I put the sub in a thread I couuld pause and when the "loop" has gone through all of the list views everything is there once the sub is complete and the tab page is indexed to 0 showing the first tab the listviews and data are gone from the other two. This happens on to the second and third tab.

 

Any thoughts?

 

ZeroEffect

If you can't find it, Build It.

 

There is no place Like 127.0.0.1 also don't forget 1 + 1 = 10

Posted

I am a tool.

 

it was in my code and how I built the Array. I changed the way the array was built and everything works.

 

Side note though, has any other than me run into this? With a tab strip on my form and I switch between tabs I lose the ability to do alot of functions from all the menus. No copy and paste, no ceter objects all that is availible is view code. Now if I go and move around some code in the windows design form everything comes back but if I switch the tab again I lose the menu items again.

 

Here is how I ajust the code.

 

'menu items are not availible with code this way.

       CType(Me.StatusBarPanel1, System.ComponentModel.ISupportInitialize).EndInit()
       CType(Me.StatusBarPanel2, System.ComponentModel.ISupportInitialize).EndInit()
       CType(Me.StatusBarPanel3, System.ComponentModel.ISupportInitialize).EndInit()
       CType(Me.StatusBarPanel4, System.ComponentModel.ISupportInitialize).EndInit()
       CType(Me.StatusBarPanel5, System.ComponentModel.ISupportInitialize).EndInit()
       CType(Me.StatusBarPanel6, System.ComponentModel.ISupportInitialize).EndInit()
       CType(Me.StatusBarPanel8, System.ComponentModel.ISupportInitialize).EndInit()
       CType(Me.StatusBarPanel9, System.ComponentModel.ISupportInitialize).EndInit()
       Me.GroupBox2.ResumeLayout(False)
       Me.bgTodaysTimedEvents.ResumeLayout(False)
       Me.GroupBox5.ResumeLayout(False)
       Me.Panel1.ResumeLayout(False)
       CType(Me.NPTimeLCD, System.ComponentModel.ISupportInitialize).EndInit()
       CType(Me.NowPlayingLCD, System.ComponentModel.ISupportInitialize).EndInit()
       CType(Me.MediaPlayer, System.ComponentModel.ISupportInitialize).EndInit()
       CType(Me.tmrPlay, System.ComponentModel.ISupportInitialize).EndInit()
       CType(Me.FadeOutTimer, System.ComponentModel.ISupportInitialize).EndInit()
       CType(Me.tmrTimedEvents, System.ComponentModel.ISupportInitialize).EndInit()
       CType(Me.CleanupTimer, System.ComponentModel.ISupportInitialize).EndInit()
       CType(Me.Time_Timer, System.ComponentModel.ISupportInitialize).EndInit()
       Me.ResumeLayout(False)

'Change it to this way and the menu items are back until the tab is changed.

       CType(Me.StatusBarPanel1, System.ComponentModel.ISupportInitialize).EndInit()
       CType(Me.StatusBarPanel2, System.ComponentModel.ISupportInitialize).EndInit()
       CType(Me.StatusBarPanel3, System.ComponentModel.ISupportInitialize).EndInit()
       CType(Me.StatusBarPanel4, System.ComponentModel.ISupportInitialize).EndInit()
       CType(Me.StatusBarPanel5, System.ComponentModel.ISupportInitialize).EndInit()
       CType(Me.StatusBarPanel6, System.ComponentModel.ISupportInitialize).EndInit()
       CType(Me.StatusBarPanel8, System.ComponentModel.ISupportInitialize).EndInit()
       CType(Me.StatusBarPanel9, System.ComponentModel.ISupportInitialize).EndInit()
       CType(Me.NPTimeLCD, System.ComponentModel.ISupportInitialize).EndInit()
       CType(Me.NowPlayingLCD, System.ComponentModel.ISupportInitialize).EndInit()
       CType(Me.MediaPlayer, System.ComponentModel.ISupportInitialize).EndInit()
       CType(Me.tmrPlay, System.ComponentModel.ISupportInitialize).EndInit()
       CType(Me.FadeOutTimer, System.ComponentModel.ISupportInitialize).EndInit()
       CType(Me.tmrTimedEvents, System.ComponentModel.ISupportInitialize).EndInit()
       CType(Me.CleanupTimer, System.ComponentModel.ISupportInitialize).EndInit()
       CType(Me.Time_Timer, System.ComponentModel.ISupportInitialize).EndInit()
       Me.GroupBox2.ResumeLayout(False)
       Me.bgTodaysTimedEvents.ResumeLayout(False)
       Me.GroupBox5.ResumeLayout(False)
       Me.Panel1.ResumeLayout(False)
       Me.ResumeLayout(False)

 

Is this a known bug and is there a fix. oh the code reverts back to the way it is on the top after a tab page is changed to another tab.

 

 

Thanks,

 

ZeroEffect

If you can't find it, Build It.

 

There is no place Like 127.0.0.1 also don't forget 1 + 1 = 10

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...