Programatically selecting a folder in TsShellTreeView

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #70944
    ABell_Thermco
    Participant

    Hi

    I want my app to restore the selected folder in TsShellTreeView when it loads. Getting the selected folder and saving it to the registry is easy enough, but I can’t find a way to restore it.

    I’m trying this, which does nothing: (C++ code)

    auto path = GetFromRegistry();
    if (DirectoryExists(path) || FileExists(path)) {
    sShellListView1->Folders[0]->PathName() = path;
    }

    Is there a way to programmatically set the currently selected file/folder?

    Andy

    #70945
    Stephane Senecal
    Participant

    From Delphi:
    For a ShellTreeView it is Path.
    For a ShellListVew it is Root.

    I don’t know if they work the same in C++ but it’s a good starting point.

    And btw, those components are the same as TShellTreeView and TShellListView. The only difference for AlphaSkins’ one is that they are skinned. You can search the whole web, not just AlphaSkins’ forums for that kind of problems.

    Stephane Senecal
    CIS Group
    Delphi programmer since 2001

    #70946
    ABell_Thermco
    Participant

    Thanks!

    Andy

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Programatically selecting a folder in TsShellTreeView’ is closed to new replies.