On Wednesday 19 October 2016 16:22:59 Krzysztof wrote: > > > > Maybe overriding "drawimage()" is better. > > Thanks, now it is working, almost. When tree item is selected then seems > that different "draw" method is called because my text disappear but > caption is drawed. Which one is it?
If the widget is focused the caption will be drawn by TInplaceEdit. " procedure titemedit.dopaintforeground(const acanvas: tcanvas); begin if fvalue <> nil then begin doextendimage(acanvas.drawinfopo,flayoutinfofocused.imageextra); end; inherited; if fvalue <> nil then begin if fgridintf <> nil then begin acanvas.rootbrushorigin:= fgridintf.getbrushorigin; flayoutinfofocused.rowindex:= fgridintf.grid.row; end; with tlistitem1(fvalue) do begin drawimage(flayoutinfofocused,acanvas); if feditor.lasttextclipped then begin include(fstate1,ns1_captionclipped); end else begin exclude(fstate1,ns1_captionclipped); end; end; end; end; " You can draw your text in drawimage() but I don't know how to elegantly update the layout. Tomorrow. :-) Martin ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot _______________________________________________ mseide-msegui-talk mailing list mseide-msegui-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk