This project is read-only.

ScintillaNET with tabpages

Topics: User Forum
Oct 11, 2013 at 3:34 PM
I'm attempting to parse through some XML strings, and upon the user clicking a "Display" button, adding tabs to the lower section, and displaying the XML document associated with that tab. Everything works well except the initial display. After the looping is complete, and all of the tabs are created, I'm forcing the last tab to be selected, but I cannot get scintilla to display the contents of the xml unless I select another tab and go back. After this, all other tabs work fine. The problem lies just in the first setting of the text area's contents. Can this control not be set with text during a thread?
Oct 11, 2013 at 3:52 PM
A Scintilla control is just like any other Windows Forms controls and should behave the same. Double-check your code. Your question at the end is unclear to me, but gives me cause for concern:

forsythwt wrote:
Can this control not be set with text during a thread?
If you are asking whether your can set the Scintilla.Text property from a background (non-UI) thread, then the answer is 'no'. Same is true of any Windows Forms control.

Dec 13, 2013 at 8:48 PM
Sorry for the delay in response. We had a 2 software releases for another project in the past 2 months. I took your advice removed the background thread, moving all processes to the UI thread, and using invokes. It works flawlessly. Thank you very much for the lead.
Feb 20, 2014 at 4:51 PM
Glad to hear it. :)