closet geek Posted April 30, 2006 Posted April 30, 2006 I have a strange issue which I can't track down, I'm starting to think it could be a bug in J#. I have an app with a RichTextBox that displays the contents of a text file a user opens. Once the user opens one file they have the option to open another in a new tab (with another RTB on it). The issue appears to be with the: tabControl1.set_SelectedTab(); method. If I specify that once that second tabPage is created that it should be "selected" using the above code the contents in the RichTextBox on that new tabPage gets scrolled to the bottom... If I don't select the new tab as it is created but manually click on the tab instead the contents of the RichTextBox doesn't scroll to the bottom. Any ideas? Quote
Cags Posted April 30, 2006 Posted April 30, 2006 I've not tested it but my theory is this is caused by some sort of focus issue. By manually changing the selected tab (i.e. clicking on it) focus is maintained by the actually tab. Perhaps programmatically selecting the tab is setting focus to the first object on the tab page. Quote Anybody looking for a graduate programmer (Midlands, England)?
closet geek Posted April 30, 2006 Author Posted April 30, 2006 It seems to be something like that, I've had a go at forcing other things to have focus before the tab gets removed but it's not working well... I do think you're right however, but it looks like a work around is needed. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.