Tshelltreeview
Author: s | 2025-04-24
TShellTreeView. Компонент TShellTreeView находится на вкладке Misc. Свойства компонента TShellTreeView. TShellTreeView. Компонент TShellTreeView находится на вкладке Misc. Свойства компонента TShellTreeView.
TShellTreeView - forum.lazarus.freepascal.org
Tek-Tips is the largest IT community on the Internet today! Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet! Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go! Home Forums Software Programmers Development Tools Embarcadero: Delphi You are using an out of date browser. It may not display this or other websites correctly.You should upgrade or use an alternative browser. Root name displayed byTShellViewList Thread starter bobbie100 Start date Jun 29, 2004 Status Not open for further replies. #1 I'm trying to use the TShellTreeView component as a simple directory selector within a preferences form. Seems to work fine for what I'm doing EXCEPT when I set the Root directory as an explicit string it does not display the correct root directory name. It always seems to display the level 1 directory.For example if I set Root := 'c:\Program Files\Borland\Delphi 7';then the root is displayed as Documents and Settings, but all the sub-directories of Delphi 7 are correctly displayed. From my investigation the problem appears to be at \Demos\ShellControls\ShellCtrls.pas within procedure TCustomShellTreeView.CreateRoot: procedure TCustomShellTreeView.CreateRoot;var RootNode: TTreeNode; ErrorMsg: string;begin if (csLoading in ComponentState) then Exit; try FRootFolder := CreateRootFolder(FRootFolder, FOldRoot, FRoot); ErrorMsg := ''; except on E : Exception do ErrorMsg := E.Message; end; if Assigned(FRootFolder) then begin FLoadingRoot := true; try if Items.Count > 0 then ClearItems; RootNode := Items.Add(nil, ''); with RootNode do begin Data := TShellFolder.Create(nil, FRootFolder.AbsoluteID, FRootFolder.ShellFolder);[Blue]//This is the problem - Text is not set correctly[/Blue] Text := GetDisplayName(DesktopShellFolder, TShellFolder(Data).AbsoluteID, SHGDN_NORMAL); if FUseShellImages and not Assigned(Images) then begin RootNode.ImageIndex := GetShellImage(TShellFolder(RootNode.Data).AbsoluteID, False, False); RootNode.SelectedIndex := GetShellImage(TShellFolder(RootNode.Data).AbsoluteID, False, True); end; RootNode.HasChildren := TShellFolder(RootNode.Data).SubFolders; end; RootNode.Expand(False); Selected := RootNode; finally FLoadingRoot := False; end; end; if ErrorMsg '' then Raise Exception.Create( ErrorMsg );end; Can anybody shed any light on what's going on and how to fix it?I am running Delphi 7 Enterprise on Windows XP Pro. Status Not open for further replies. Similar threads Home Forums Software Programmers Development Tools Embarcadero: Delphi This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.By continuing to use this site, you are consenting to our use of cookies.. TShellTreeView. Компонент TShellTreeView находится на вкладке Misc. Свойства компонента TShellTreeView. TShellTreeView. Компонент TShellTreeView находится на вкладке Misc. Свойства компонента TShellTreeView. How to say TShellTreeView in French? Pronunciation of TShellTreeView with 1 audio pronunciation and more for TShellTreeView. TShellTreeView. TShellTreeView component under the tab Misc. Component Properties TShellTreeView. Add component TShellListView. Set properties ShellTreeView1. Add a TShellTreeView and a TShellListView to a form, set the TShellTreeView's ShellListView property to the one added to the form, compile, change folders using the TShellTreeView. Talking to TShellTreeView. There is little coding to do in getting TShellListView to communicate with TShellTreeView. In the Object Inspector for TShellTreeView, set the property ShellListView to the name of your TShellListView object. This ought to be already stored on a dropdown menu if both TShellListView and TShellTreeView objects are Talking to TShellTreeView. There is little coding to do in getting TShellListView to communicate with TShellTreeView. In the Object Inspector for TShellTreeView, set the property ShellListView to the name of your TShellListView object. This ought to be already stored on a dropdown menu if both TShellListView and TShellTreeView objects are TShellTreeView. Компонент TShellTreeView находится на вкладке Misc. Свойства компонента TShellTreeView. Добавим компонент TShellListView. Соответственно укажем эти компоненты в свойствах друг друга.Comments
Tek-Tips is the largest IT community on the Internet today! Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet! Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go! Home Forums Software Programmers Development Tools Embarcadero: Delphi You are using an out of date browser. It may not display this or other websites correctly.You should upgrade or use an alternative browser. Root name displayed byTShellViewList Thread starter bobbie100 Start date Jun 29, 2004 Status Not open for further replies. #1 I'm trying to use the TShellTreeView component as a simple directory selector within a preferences form. Seems to work fine for what I'm doing EXCEPT when I set the Root directory as an explicit string it does not display the correct root directory name. It always seems to display the level 1 directory.For example if I set Root := 'c:\Program Files\Borland\Delphi 7';then the root is displayed as Documents and Settings, but all the sub-directories of Delphi 7 are correctly displayed. From my investigation the problem appears to be at \Demos\ShellControls\ShellCtrls.pas within procedure TCustomShellTreeView.CreateRoot: procedure TCustomShellTreeView.CreateRoot;var RootNode: TTreeNode; ErrorMsg: string;begin if (csLoading in ComponentState) then Exit; try FRootFolder := CreateRootFolder(FRootFolder, FOldRoot, FRoot); ErrorMsg := ''; except on E : Exception do ErrorMsg := E.Message; end; if Assigned(FRootFolder) then begin FLoadingRoot := true; try if Items.Count > 0 then ClearItems; RootNode := Items.Add(nil, ''); with RootNode do begin Data := TShellFolder.Create(nil, FRootFolder.AbsoluteID, FRootFolder.ShellFolder);[Blue]//This is the problem - Text is not set correctly[/Blue] Text := GetDisplayName(DesktopShellFolder, TShellFolder(Data).AbsoluteID, SHGDN_NORMAL); if FUseShellImages and not Assigned(Images) then begin RootNode.ImageIndex := GetShellImage(TShellFolder(RootNode.Data).AbsoluteID, False, False); RootNode.SelectedIndex := GetShellImage(TShellFolder(RootNode.Data).AbsoluteID, False, True); end; RootNode.HasChildren := TShellFolder(RootNode.Data).SubFolders; end; RootNode.Expand(False); Selected := RootNode; finally FLoadingRoot := False; end; end; if ErrorMsg '' then Raise Exception.Create( ErrorMsg );end; Can anybody shed any light on what's going on and how to fix it?I am running Delphi 7 Enterprise on Windows XP Pro. Status Not open for further replies. Similar threads Home Forums Software Programmers Development Tools Embarcadero: Delphi This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.By continuing to use this site, you are consenting to our use of cookies.
2025-04-05