Difference between revisions of "Shell Controls"

From Lazarus wiki
m (Fixed syntax highlighting; deleted category included in page template)
Line 4: Line 4:
  
 
===TShellTreeView===
 
===TShellTreeView===
 +
 
TShellTreeView component under the tab Misc.
 
TShellTreeView component under the tab Misc.
 
<div>[[Image:TShellTreeView.png]]</div>
 
<div>[[Image:TShellTreeView.png]]</div>
 
Component Properties TShellTreeView.
 
Component Properties TShellTreeView.
 
<div>[[Image:Property.png]]</div>
 
<div>[[Image:Property.png]]</div>
 +
 
Add component TShellListView. Set properties  
 
Add component TShellListView. Set properties  
<syntaxhighlight>
+
 
 +
<syntaxhighlight lang=pascal>
 
ShellTreeView1.ShellListView := ShellListView1;
 
ShellTreeView1.ShellListView := ShellListView1;
 
ShellListView1.ShellTreeView := ShellTreeView1;
 
ShellListView1.ShellTreeView := ShellTreeView1;
 
</syntaxhighlight>
 
</syntaxhighlight>
 +
 
<div>[[Image:Выделение 221.png]]</div>
 
<div>[[Image:Выделение 221.png]]</div>
 
Run application. We can see root directory in Linux.
 
Run application. We can see root directory in Linux.
 
<div>[[Image:Form1 220.png]]</div>
 
<div>[[Image:Form1 220.png]]</div>
Better way to do is:
+
 
<syntaxhighlight>procedure TForm1.FormCreate(Sender: TObject);
+
Better way to do this is:
 +
 
 +
<syntaxhighlight lang=pascal>procedure TForm1.FormCreate(Sender: TObject);
 
begin
 
begin
 
   ShellTreeView2:= TShellTreeView.create(Form1);
 
   ShellTreeView2:= TShellTreeView.create(Form1);
Line 27: Line 33:
 
end;  </syntaxhighlight>
 
end;  </syntaxhighlight>
 
<div>[[Image:Form1 222.png]]</div>
 
<div>[[Image:Form1 222.png]]</div>
 
Mihail Chichkanov
 
 
[[Category:LCL]]
 
[[Category:GUI]]
 

Revision as of 11:43, 26 February 2020

English (en) русский (ru)

The Shell Controls are a series of advanced controls destinated to beaultifully represent files and directories of the system.

TShellTreeView

TShellTreeView component under the tab Misc.

TShellTreeView.png

Component Properties TShellTreeView.

Property.png

Add component TShellListView. Set properties

ShellTreeView1.ShellListView := ShellListView1;
ShellListView1.ShellTreeView := ShellTreeView1;
Выделение 221.png

Run application. We can see root directory in Linux.

Form1 220.png

Better way to do this is:

procedure TForm1.FormCreate(Sender: TObject);
begin
   ShellTreeView2:= TShellTreeView.create(Form1);
   ShellTreeView2.Left:=10;
   ShellTreeView2.Top:=10;
   ShellTreeView2.Width:=250;
   ShellTreeView2.Height:=430;
   ShellTreeView2.Parent:=Form1;
end;
Form1 222.png