Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
C

Cory Borrow

@Cory Borrow
About
Posts
4
Topics
2
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Problem I can't get past.
    C Cory Borrow

    Thanks, I checked out the debugging info and saw that Tag was not even showing up in it, so I created another class to extend the TabPage and added an IsFileReadOnly variable and it seems to work fine now.

    C# help

  • Problem I can't get past.
    C Cory Borrow

    It shows that it selected has a TabPage I can view all the info for that tabpage and everything though the debugger. It's weird that it stops and that line though, it skips the rest of the places where I have used tabControl1.SelectedTab.

    C# help

  • Problem I can't get past.
    C Cory Borrow

    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) { if(tabControl1.TabPages.Count > 0 && !tabControl1.SelectedTab.Disposing) { openFile = tabControl1.SelectedTab.ToolTipText; if(lengthSet == false) { if(oldLength != tabControl1.SelectedTab.Controls["textEditorControl1"].Text.Length) oldLength = tabControl1.SelectedTab.Controls["textEditorControl1"].Text.Length; if((bool)tabControl1.SelectedTab.Tag == true) { saveToolStripMenuItem.Enabled = false; toolStripButton3.Enabled = false; } else { saveToolStripMenuItem.Enabled = true; toolStripButton3.Enabled = true; } } } lengthSet = false; } The Line if((bool)tabControl.SelectedTab.Tag == true) returns the error If I add TextEditorControl editor = (TextEditorControl)tabControl1.SelectedTab.Controls["textEditorControl1"]; and replace the line with the error with if(editor.IsReadOnly) It still returns the same thing.

    C# help

  • Retreving text from treeview problem. [modified]
    C Cory Borrow

    Ok, I have a treeview and it has the following items in it. Menu 1 Sub menu 1 Then I call a function to write the items to a file. But when I open the file it shows Menu 1 Menu 1 Sub menu 1 Anyone know why it is creating the other Menu item? Here are the functions. menu += WriteMenu(menu, treeView1); string WriteMenu(string menu, TreeView treeView) { foreach(TreeViewMenuItem menuItem in treeView.Nodes) { if(menuItem.Nodes.Count > 0) { menu += menuItem.Text + "\n"; menu += WriteSubMenu(menu, menuItem); } else { menu += menuItem.Text + "\n"; } } return menu; } string WriteSubMenu(string menu, TreeViewMenuItem menuItem) { foreach(TreeViewMenuItem subItem in menuItem.Nodes) { if(subItem.Nodes.Count > 0) { menu += subItem.Text + "\n"; menu += WriteSubMenu(menu, subItem); } else { menu += subItem.Text + "\n"; } } return menu; } -- modified at 20:47 Monday 4th June, 2007

    C# help question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups