Virtual TreeView i jego wygląd

0

Mam kilka pytań związanych z tym komponentem, może ktoś kto jest już obcykany z nim zechciałby napisać jak uzyskać takie coś:
Obrazek 1 (chodzi mi tutaj o ten zaznaczony element, a konkretnie: grafika w nim, kilka linijek tekstu)

Obrazek 2 tutaj także chodzi o zaznaczony element - o jego tło.

Również przy okazji chciałem zapytać czy da się w tym komponencie sprawić by wybrana gałąź drzewa miała taką właściwość jak niektóre komponenty, czyli Enabled. To znaczy żeby nie dało się jej rozwinąć kliknąć itp.

0

1 i 2 - trzeba sobie narysować samemu, niestety
a) inna szerokość zaznaczonego - w OnMeasureItem
if Node = vt1.GetFirstSelected then
NodeHeight := 50
else
NodeHeight := 18;

do rysowania masz do wyboru do koloru

// paint events
    FOnAfterPaint,                               // triggered when the tree has entirely been painted
    FOnBeforePaint: TVTPaintEvent;               // triggered when the tree is about to be painted
    FOnAfterItemPaint: TVTAfterItemPaintEvent;   // triggered after an item has been painted
    FOnBeforeItemPaint: TVTBeforeItemPaintEvent; // triggered when an item is about to be painted
    FOnBeforeItemErase: TVTBeforeItemEraseEvent; // triggered when an item's background is about to be erased
    FOnAfterItemErase: TVTAfterItemEraseEvent;   // triggered after an item's background has been erased
    FOnAfterCellPaint: TVTAfterCellPaintEvent;   // triggered after a column of an item has been painted
    FOnBeforeCellPaint: TVTBeforeCellPaintEvent; // triggered when a column of an item is about to be painted
    FOnHeaderDraw: TVTHeaderPaintEvent;          // Used when owner draw is enabled for the header and a column is set
                                                 // to owner draw mode.
    FOnHeaderDrawQueryElements: TVTHeaderPaintQueryElementsEvent; // Used for advanced header painting to query the
                                                 // application for the elements, which are drawn by it and which should
                                                 // be drawn by the tree.
    FOnAdvancedHeaderDraw: TVTAdvancedHeaderPaintEvent; // Used when owner draw is enabled for the header and a column
                                                 // is set to owner draw mode. But only if OnHeaderDrawQueryElements
                                                 // returns at least one element to be drawn by the application.
                                                 // In this case OnHeaderDraw is not used.
    FOnGetLineStyle: TVTGetLineStyleEvent;       // triggered when a custom line style is used and the pattern brush
                                                 // needs to be build
    FOnPaintBackground: TVTBackgroundPaintEvent; // triggered if a part of the tree's background must be erased which is
                                                 // not covered by any node
    FOnMeasureItem: TVTMeasureItemEvent;         // Triggered when a node is about to be drawn and its height was not yet
                                                 // determined by the application.   

3 - IsDisabled

1 użytkowników online, w tym zalogowanych: 0, gości: 1