Board index » delphi » Outliner widget?

Outliner widget?


2007-06-16 01:47:48 AM
delphi246
Hello
I'm looking for a VCL component that would support
hierarchical outliners like this :
john.redmood.com/pict570gif.html
I know of VirtualTreeView (www.soft-gems.net), but I don't know how
much work it'd be to turn it into the above.
Anyone seen something like that?
Thank you.
 
 

Re:Outliner widget?

Hello!
You wrote on Fri, 15 Jun 2007 19:47:48 +0200:
GG>I know of VirtualTreeView (www.soft-gems.net), but I don't know how
GG>much work it'd be to turn it into the above.
GG>Anyone seen something like that?
Don't know anything about VTV, but ElTree in ElPack (
www.lmdinnovative.com/products/lmdelpack/ ) does this easily.
With best regards,
Eugene Mayevski
www.SecureBlackbox.com - the comprehensive component suite for
network security
 

Re:Outliner widget?

On Fri, 15 Jun 2007 20:54:55 +0300, "Eugene Mayevski"
<XXXX@XXXXX.COM>writes:
Quote
Don't know anything about VTV, but ElTree in ElPack (
www.lmdinnovative.com/products/lmdelpack/ ) does this easily.
Nice. Can I remove the grey bars on the left of each line, and have
bullets in front of each item, so that it looks and feels just like
the outliner above?
 

Re:Outliner widget?

Hello,
Quote
I'm looking for a VCL component that would support
hierarchical outliners like this :

john.redmood.com/pict570gif.html
Why not use standard TTreeView? There every node can have two images where
you may assign the glyph with digit/number and glyph with blue dot
 

Re:Outliner widget?

On Fri, 15 Jun 2007 22:44:13 +0300, "Mike Shkolnik"
<XXXX@XXXXX.COM>writes:
Quote
Why not use standard TTreeView? There every node can have two images where
you may assign the glyph with digit/number and glyph with blue dot
Looks interesting. Do you know if TTreeView can be displayed without
the grey dotted lines on the left, so it looks just like the outliner
above?
Thanks.
 

Re:Outliner widget?

In article <XXXX@XXXXX.COM>,
XXXX@XXXXX.COM says...
Quote
On Fri, 15 Jun 2007 22:44:13 +0300, "Mike Shkolnik"
<XXXX@XXXXX.COM>writes:
>Why not use standard TTreeView? There every node can have two images where
>you may assign the glyph with digit/number and glyph with blue dot

Looks interesting. Do you know if TTreeView can be displayed without
the grey dotted lines on the left, so it looks just like the outliner
above?

Thanks.

I'm pretty sure TeeTree will allow you to do this
www.steema.com/products/teetree/vcl/overview.html
 

Re:Outliner widget?

Gilles Ganault writes:
Quote
On Fri, 15 Jun 2007 22:44:13 +0300, "Mike Shkolnik"
<XXXX@XXXXX.COM>writes:
>Why not use standard TTreeView? There every node can have two images where
>you may assign the glyph with digit/number and glyph with blue dot

Looks interesting. Do you know if TTreeView can be displayed without
the grey dotted lines on the left, so it looks just like the outliner
above?

Thanks.
TTreeView.ShowLines:=False???
Willem
--
Willem van Deursen, The Netherlands
XXXX@XXXXX.COM
replace _nospam@nospam_ for @ to get a valid email address
www.carthago.nl
 

Re:Outliner widget?

Quote
Looks interesting. Do you know if TTreeView can be displayed without
the grey dotted lines on the left, so it looks just like the outliner
above?
yourTreeView.ShowLines := False
 

Re:Outliner widget?

On Fri, 15 Jun 2007 22:44:13 +0300, "Mike Shkolnik" <XXXX@XXXXX.COM>
writes:
Quote
>I'm looking for a VCL component that would support
>hierarchical outliners like this :
>
>john.redmood.com/pict570gif.html
Why not use standard TTreeView? There every node can have two images where
you may assign the glyph with digit/number and glyph with blue dot
I've been lookiong for a Delphi outliner control of similar capabilities to
Ecco for a long, long time. No luck so far. I did try to coax TVirtualTree
into acting as an editable outline - it can be done, but has limitations
that preclude this solution in practice, from the usability point of view.
TTreeView - or even TVirtualTree - will not display multiline outline
items. More precisely, VT will display multiline items, but when editing it
will revert to a single-line input control, which kills the idea really,
since it becomes awfully inconvenient to edit items in the outline.
Another impracticality: with multi-line items, VT really likes to have all
items of equal height. This is no good, since you would end up with huge
gaps in "shorter" items. I haven't been able to make VT display items of
variable height and make them editable as well. At best, when editing, the
item's edit control does not automatically resize vertically.
Also, the screenshot doesn't do full justice to the Ecco outliner. Ecco
supports font formatting within items, while VT will only let you format
whole items (you can make an item bold+red, but you can not make a single
word bold+red).
Another issue I have encountered with VT is the automatic numbering of items
in the outline. It can be done, using columns, but will take more space
(always a full column width), unlike what you can see in the Ecco
screenshot.
marek
 

Re:Outliner widget?

On Sun, 17 Jun 2007 16:17:57 +0200, marek jedlinski
<XXXX@XXXXX.COM>writes:
Quote
I've been lookiong for a Delphi outliner control of similar capabilities to
Ecco for a long, long time. No luck so far.
Too bad :-( it is strange that no one came up with such useful widget.
Thanks everyone. I will take a look at the suggestions above.
 

Re:Outliner widget?

Quote
On Fri, 15 Jun 2007 22:44:13 +0300, "Mike Shkolnik" <XXXX@XXXXX.COM>
writes:
Also, the screenshot doesn't do full justice to the Eccooutliner. Ecco
supports font formatting within items, while VT will only let you format
whole items (you can make an item bold+red, but you can not make a single
word bold+red).
Anything is possible with VST, this code marks every number BOLD and
RED
procedure TForm1.VirtualDrawTree1DrawNode(Sender: TBaseVirtualTree;
const PaintInfo: TVTPaintInfo);
const
NumberFontColor: array[boolean] of TColor = (clBtnText, clRed);
NumberFontStyle: array[boolean] of TFontStyles = ([], [fsBold]);
var
CellText: string;
CharIndex: integer;
IsCharANumber: boolean;
TextRect: TRect;
LeftSideText, TopSideText: integer;
Bitmap: TBitmap;
function IsNumber(aChar: Char): boolean;
begin
Result := aChar in ['0'..'9'];
end;
begin
CellText := StringList[PaintInfo.Node.Index];
TextRect := PaintInfo.CellRect;
LeftSideText := TextRect.Left +
TVirtualStringTree(Sender).TextMargin;
TopSideText := (Sender.NodeHeight[PaintInfo.Node] -
PaintInfo.Canvas.TextHeight('W_')) div 2;
Bitmap := TBitmap.Create;
try
Bitmap.Width := TextRect.Right - TextRect.Left;
Bitmap.Height := TextRect.Bottom - TextRect.Top;
Bitmap.Canvas.Font.Assign(PaintInfo.Canvas.Font);
Bitmap.Canvas.Pen.Assign(PaintInfo.Canvas.Pen);
Bitmap.Canvas.Brush.Assign(PaintInfo.Canvas.Brush);
Bitmap.Transparent := true;
for CharIndex := 1 to Length(CellText) do
begin
IsCharANumber := IsNumber(CellText[CharIndex]) and
Checkbox1.Checked;
PaintInfo.Canvas.Font.Color := NumberFontColor[IsCharANumber];
PaintInfo.Canvas.Font.Style := NumberFontStyle[IsCharANumber];
//zonder aanroepen SetBkMode worden de teksten niet goed
getekend
SetBkMode(PaintInfo.Canvas.Handle, TRANSPARENT);
PaintInfo.Canvas.TextOut(TextRect.Left + LeftSideText,
TextRect.Top + TopSideText,
CellText[CharIndex]);
Inc(LeftSideText,
PaintInfo.Canvas.TextWidth(CellText[CharIndex]));
end;
PaintInfo.Canvas.Draw(TextRect.Left, TextRect.Top, Bitmap);
if (poDrawFocusRect in PaintInfo.PaintOptions) and
(Sender.GetFirstSelected = PaintInfo.Node) then
DrawFocusRect(PaintInfo.Canvas.Handle, PaintInfo.CellRect);
finally
Bitmap.Free;
end;
end;