Click here to Skip to main content
15,908,675 members
Home / Discussions / C#
   

C#

 
GeneralRe: How to change the color & size of the text in a textbox Pin
Bahaa Hany26-Jun-07 18:59
Bahaa Hany26-Jun-07 18:59 
QuestionHow to load and run non .net exe in memory? Pin
Rationalise26-Jun-07 16:06
Rationalise26-Jun-07 16:06 
AnswerRe: How to load and run non .net exe in memory? Pin
Christian Graus26-Jun-07 16:21
protectorChristian Graus26-Jun-07 16:21 
QuestionHow can I access the App's tab in the task Manager Pin
jeguzmanv26-Jun-07 14:59
jeguzmanv26-Jun-07 14:59 
AnswerRe: How can I access the App's tab in the task Manager Pin
Christian Graus26-Jun-07 15:45
protectorChristian Graus26-Jun-07 15:45 
GeneralRe: How can I access the App's tab in the task Manager Pin
jeguzmanv27-Jun-07 5:03
jeguzmanv27-Jun-07 5:03 
GeneralRe: How can I access the App's tab in the task Manager Pin
jeguzmanv27-Jun-07 5:52
jeguzmanv27-Jun-07 5:52 
QuestionProblem I can't get past. Pin
Cory Borrow26-Jun-07 13:54
Cory Borrow26-Jun-07 13:54 
I have an application it is tabbed based and holds a texteditor in each tab (The ICSharpCode TextEditorControl). I can open as many tabs as I want but when I switch bewteen 2 or three tabs I get this error.

I'm am getting "Object reference not set to an instance of an object" result back. Problay somthing small I am missing somewhere, but I can't see where.

Below is the code for when a tab switches.


void TabControl1SelectedIndexChanged(object sender, EventArgs e)<br />
		{<br />
			if(tabControl1.TabPages.Count > 0 && !tabControl1.SelectedTab.Disposing) {<br />
				openFile = tabControl1.SelectedTab.ToolTipText;<br />
				<br />
				if(lengthSet == false) {<br />
					if(oldLength != tabControl1.SelectedTab.Controls["textEditorControl1"].Text.Length)<br />
						oldLength = tabControl1.SelectedTab.Controls["textEditorControl1"].Text.Length;<br />
						<br />
					if((bool)tabControl1.SelectedTab.Tag == true) {<br />
						saveToolStripMenuItem.Enabled = false;<br />
						toolStripButton3.Enabled = false;<br />
					}<br />
					else {<br />
						saveToolStripMenuItem.Enabled = true;<br />
						toolStripButton3.Enabled = true;<br />
					}<br />
				}<br />
			}<br />
			lengthSet = false;<br />
		}



The Line
if((bool)tabControl.SelectedTab.Tag == true)
returns the error

If I add
<br />
TextEditorControl editor = (TextEditorControl)tabControl1.SelectedTab.Controls["textEditorControl1"];<br />


and replace the line with the error with
if(editor.IsReadOnly)
It still returns the same thing.
AnswerRe: Problem I can't get past. Pin
Ed.Poore26-Jun-07 13:59
Ed.Poore26-Jun-07 13:59 
GeneralRe: Problem I can't get past. Pin
Cory Borrow26-Jun-07 14:49
Cory Borrow26-Jun-07 14:49 
AnswerRe: Problem I can't get past. Pin
Christian Graus26-Jun-07 15:02
protectorChristian Graus26-Jun-07 15:02 
GeneralRe: Problem I can't get past. Pin
Cory Borrow26-Jun-07 15:54
Cory Borrow26-Jun-07 15:54 
GeneralRe: Problem I can't get past. Pin
Christian Graus26-Jun-07 16:22
protectorChristian Graus26-Jun-07 16:22 
QuestionC#, IE, C++ & BHO's... getting a C# Explorer Toolbar to talk to a C++ BHO Pin
BenAnderson26-Jun-07 11:03
BenAnderson26-Jun-07 11:03 
Questionftp FtpWebRespose.GetRespone() Exception Pin
Mostafa Siraj26-Jun-07 8:43
Mostafa Siraj26-Jun-07 8:43 
QuestionUDP Error Pin
ramdil26-Jun-07 6:54
ramdil26-Jun-07 6:54 
AnswerRe: UDP Error Pin
Dave Kreskowiak26-Jun-07 7:07
mveDave Kreskowiak26-Jun-07 7:07 
GeneralRe: UDP Error Pin
ramdil26-Jun-07 7:50
ramdil26-Jun-07 7:50 
GeneralRe: UDP Error Pin
Dave Kreskowiak26-Jun-07 9:11
mveDave Kreskowiak26-Jun-07 9:11 
GeneralRe: UDP Error Pin
ramdil27-Jun-07 3:20
ramdil27-Jun-07 3:20 
GeneralRe: UDP Error Pin
Dave Kreskowiak27-Jun-07 11:45
mveDave Kreskowiak27-Jun-07 11:45 
GeneralRe: UDP Error Pin
ramdil29-Jun-07 2:52
ramdil29-Jun-07 2:52 
QuestionAlways on top Pin
max2929726-Jun-07 6:09
max2929726-Jun-07 6:09 
AnswerRe: Always on top Pin
Luc Pattyn26-Jun-07 6:37
sitebuilderLuc Pattyn26-Jun-07 6:37 
AnswerRe: Always on top Pin
led mike26-Jun-07 6:54
led mike26-Jun-07 6:54 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.