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
G

gerbenschmidt

@gerbenschmidt
About
Posts
10
Topics
4
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • how to select an existing TreeNode
    G gerbenschmidt

    Hi, I can follow that....but treeView1.Nodes[213] does not belong to the Selected ListView Item. how can I find the Node that belongs to this ListView Item? (ProjectTreeView.SelectedNode.FullPath + "\\" + ProjectListView.SelectedItems[0].Text);

    C# question tutorial

  • how to select an existing TreeNode
    G gerbenschmidt

    Hi, I am creating a windows application that has a custom treeview/listview windows explorer. How can I select the corresponding TreeNode of a selected ListView directory?

    C# question tutorial

  • TreeView.SelectedNode.FullPath problem
    G gerbenschmidt

    Thanx man!.....great help....

    C# question data-structures testing beta-testing help

  • TreeView.SelectedNode.FullPath problem
    G gerbenschmidt

    Hi, I have a form which must act like a custom directory browser. Now my code has one NodeMouseClick event which is handling 2 actions when selecting a TreeView Node: 1)Build the Items for the ListView (this works) 2)Show the Full path of the Selected Node in a StatusBar In my Code 2) (bold lines) returns the path of the previous clicked Node!!!....Has anyone an idea what is wrong?? // This is the Projects Path which is set in the Menu_Settings.cs file (an application setting) string sProjectsPath = global::Offshore_Supports_Menu.Properties.Settings.Default.Projects_Dir; // This "10.0159 Ormen Lange"; is based on the Project "Number & Name" filled in the "New Project" forms. // The "New Project" forms should store the user input data in somekind of project file. like an *.INI file // This *.INI file is loaded into the ProjectWindow.cs to view a custom explorer of the existing // or new generated typical project directory tree. // For testing purposes I typed a directory name "10.0159 Ormen Lange"; // but it should be inserted from the *.INI file string sProject = "10.3459 Ormen Lange II"; private void PopulateTreeView() { //The Project Directory Root Folder to begin the TreeView TreeNode rootNode; DirectoryInfo ProjectPath = new DirectoryInfo(sProjectsPath + "\\" + sProject); if (ProjectPath.Exists) { rootNode = new TreeNode(ProjectPath.Name); rootNode.Tag = ProjectPath; rootNode.ImageIndex = 2; rootNode.SelectedImageIndex = 2; GetDirectories(ProjectPath.GetDirectories(), rootNode); ProjectTreeView.Nodes.Add(rootNode); rootNode.Expand(); StatusLabel1.Text = ProjectPath.ToString(); } } void ProjectTreeView_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e) { TreeNode newSelected = e.Node; ProjectListView.Items.Clear(); DirectoryInfo nodeDirInfo = (DirectoryInfo)newSelected.Tag; ListViewItem.ListViewSubItem[] subItems; ListViewItem item = null; **if (ProjectTreeView.SelectedNode.IsSelected == true) { StatusLabel1.Text = sProjectsPath + "\\" + ProjectTreeView.SelectedNode.FullPath; }** //ListView item

    C# question data-structures testing beta-testing help

  • How to show ListView items of First TreeNode?
    G gerbenschmidt

    Thanx man....you brought me on an idea and it worked...

    C# tutorial question

  • How to show ListView items of First TreeNode?
    G gerbenschmidt

    Hi, In a TreeView/ListView Form a TreeNodeMouseClickEvent on a TreeView is showing the ListView items. When loading the Form, it also must return the ListView items of the First Node (rootNode). But the ListView items are only returned after selecting a Node. Has anyone an idea how to load the the Listview Items of the First TreeView Node(rootNode)?

    C# tutorial question

  • ItemActivate of directory browser
    G gerbenschmidt

    I managed to run files....I placed a MessageBox to check what the path was of the SelectedNode....It turned out not to be the Full Path but a Folder in the tree. So I added also the string of the rootpath to that Folder.... Anyway it is running files now....however only known filetypes....when a filetype is not associated to a program by windows I get an error...is it difficult to solve that? also folders are listed in the ListView.....when I double click them....an external explorer window of the selected item is opened outside my application....but the ListView should work like an explorer too....so it must browse when a folder is double clicked and it should run when a file is selected... What is the difference between: ListView1.FocusedItem and ListView1.SelectedItems[0] ? Thanx for helping me out sofar....I am a beginner in programming. -- modified at 6:33 Tuesday 30th October, 2007

    C# tutorial question

  • ItemActivate of directory browser
    G gerbenschmidt

    I my case I only have to run files with their associated applications. So the code must provide the option to run all kind of files with extensions like: *.txt, *.jpg *.dwg, *.xls etc....I think about 10 types of files....a part of my code is like you mentioned to run files: private void ListView1_ItemActivate(object sender, System.EventArgs e) { try { string sPath = TreeView1.SelectedNode.FullPath; string sFileName = ListView1.FocusedItem.Text; Process.Start(sPath + "\\" + sFileName); } catch (Exception Exc) { MessageBox.Show(Exc.ToString()); } } private void ProjectWindow_Load(object sender, EventArgs e) { this.ListView1.ItemActivate += new System.EventHandler this.ListView1_ItemActivate); } But this code gives an error that the sytem cannot find the file when i double click it. The code is split up in 2 parts...the path & the file. I think it can't find the fullpath of the SelectedNode....but there must be a SelectedNode otherwise i cannot see the file in the ListView?? What am i doing wrong?

    C# tutorial question

  • ItemActivate of directory browser
    G gerbenschmidt

    If i browse to a directory which has files....I want to be able to run these files with their related software by doubleclicking in listview.....e.g. an AutoCAD file: drawing.dwg (isn't that ItemActivate?)

    C# tutorial question

  • ItemActivate of directory browser
    G gerbenschmidt

    Hi, I have a form which should work like a custom directory browser. The form has a TreeView & ListView (like a windows explorer). I managed to browse trough the TreeView. But I also want to Activate files in the ListView. Anyone an idea how to do this?

    C# tutorial 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