Results 1 to 2 of 2

Thread: path navigation

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Aug 2003
    Location
    Edinburgh, UK
    Posts
    2,773

    path navigation

    hi there.

    i basically have a program which displays lists of files in one filelist box, and can navigate using the treenode/view box.

    i have a text box where the user can type in the path to navigate to.

    if the user enters the incorrect path, a message appears (exception) which i have caught.

    however

    if the user types in an invalid path BUT then without clicking the "navigate" button, they click on a node in the treeview, the program generates an exception (Visual Studio.net)

    because it is adding the path with whatever is in the textbox + the current treenode it is on, therefore the error is thrown at me

    how can i sort this? I want it so that if the invalid path has been entered then user clicks on a node in the treeview, i want to get the path of that treenode they selected and put that in the textbox

    thanks!

  2. #2
    PowerPoster sunburnt's Avatar
    Join Date
    Feb 2001
    Location
    Boulder, Colorado
    Posts
    1,403
    check before adding a directory to the listview that it actually exists with the System.IO.Directory.Exists() method, and show a message box then.

    Unless I'm missing something
    Every passing hour brings the Solar System forty-three thousand miles closer to Globular Cluster M13 in Hercules -- and still there are some misfits who insist that there is no such thing as progress.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width