Board index » delphi » Outliner widget?
Gilles Ganault
Delphi Developer |
Gilles Ganault
Delphi Developer |
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. |
Eugene Mayevski
Delphi Developer |
2007-06-16 01:54:55 AM
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 |
Gilles Ganault
Delphi Developer |
2007-06-16 03:42:18 AM
Re:Outliner widget?
On Fri, 15 Jun 2007 20:54:55 +0300, "Eugene Mayevski"
<XXXX@XXXXX.COM>writes: QuoteDon't know anything about VTV, but ElTree in ElPack ( the outliner above? |
Mike Shkolnik
Delphi Developer |
2007-06-16 03:44:13 AM
Re:Outliner widget?
Hello,
QuoteI'm looking for a VCL component that would support |
Gilles Ganault
Delphi Developer |
2007-06-16 04:06:29 PM
Re:Outliner widget?
On Fri, 15 Jun 2007 22:44:13 +0300, "Mike Shkolnik"
<XXXX@XXXXX.COM>writes: QuoteWhy not use standard TTreeView? There every node can have two images where above? Thanks. |
Adam Roslon
Delphi Developer |
2007-06-16 09:49:11 PM
Re:Outliner widget?
In article <XXXX@XXXXX.COM>,
XXXX@XXXXX.COM says... QuoteOn Fri, 15 Jun 2007 22:44:13 +0300, "Mike Shkolnik" |
willem van deursen
Delphi Developer |
2007-06-16 11:31:27 PM
Re:Outliner widget?
Gilles Ganault writes:
QuoteOn Fri, 15 Jun 2007 22:44:13 +0300, "Mike Shkolnik" -- Willem van Deursen, The Netherlands XXXX@XXXXX.COM replace _nospam@nospam_ for @ to get a valid email address www.carthago.nl |
Mike Shkolnik
Delphi Developer |
2007-06-17 04:39:28 AM
Re:Outliner widget?QuoteLooks interesting. Do you know if TTreeView can be displayed without |
marek jedlinski
Delphi Developer |
2007-06-17 10:17:57 PM
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 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 |
Gilles Ganault
Delphi Developer |
2007-06-18 10:00:29 AM
Re:Outliner widget?
On Sun, 17 Jun 2007 16:17:57 +0200, marek jedlinski
<XXXX@XXXXX.COM>writes: QuoteI've been lookiong for a Delphi outliner control of similar capabilities to |
Henkdh
Delphi Developer |
2007-08-07 03:08:27 AM
Re:Outliner widget?QuoteOn Fri, 15 Jun 2007 22:44:13 +0300, "Mike Shkolnik" <XXXX@XXXXX.COM> 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; |