Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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?

Posted
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.
Anybody looking for a graduate programmer (Midlands, England)?
Posted
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.

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...