Last change
on this file since 461 was 15, checked in by RBRi, 19 years ago |
+ components stuff
|
-
Property svn:eol-style
set to
native
|
File size:
1.2 KB
|
Line | |
---|
1 | TOutline2
|
---|
2 |
|
---|
3 | A new Outline (also known as a "Tree View") for Sibyl.
|
---|
4 | Main features:
|
---|
5 | - lots of options
|
---|
6 | - more compact
|
---|
7 | - fast
|
---|
8 | - more control over navigation through code
|
---|
9 |
|
---|
10 | See componentsTestForm.pas for examples of how to use.
|
---|
11 |
|
---|
12 | Basically, to load items into the TOutline2 you use code like this:
|
---|
13 |
|
---|
14 | var
|
---|
15 | Node: TNode;
|
---|
16 | begin
|
---|
17 | Node:= TheOutline.AddChild( 'Seven', nil );
|
---|
18 | Node:= Node.AddChild( 'Biscuit', nil );
|
---|
19 | Node.AddChild( 'Afghan', nil );
|
---|
20 |
|
---|
21 |
|
---|
22 |
|
---|
23 | Notes
|
---|
24 | -----
|
---|
25 |
|
---|
26 |
|
---|
27 | The scroll bars are checked for visibility only when
|
---|
28 | - the contents of the outline changes
|
---|
29 | - a "visible" node is expanded/collapsed
|
---|
30 |
|
---|
31 | Node.IsVisible tells you if all a nodes' parents are expanded.
|
---|
32 | Not if it is physically on screen.
|
---|
33 |
|
---|
34 | The scroll bar positions are updated at every refresh. The number of
|
---|
35 | physical lines "visible" in the whole outline is counted while painting.
|
---|
36 | When the topnode is found it's index from the top is stored in _TopLineIndex
|
---|
37 | and used to set the vertical scrollbar position.
|
---|
38 |
|
---|
39 | During refresh the maximum width required is calculated, and used to decide
|
---|
40 | if a horizontal scroll bar is needed, and the position of the scrollbar
|
---|
41 |
|
---|
42 | The horizontal scrollbar's position is the number of pixels to start drawing at...
|
---|
Note:
See
TracBrowser
for help on using the repository browser.