Is there a possibility to draw items background depending not on style-no but on item number?
It is for text analysis - easy-to-read to difficult in five different levels
Draw Items Background
-
- Site Admin
- Posts: 17564
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Do you mean text background?
OnDrawTextBack event has "hidden" parameters, including item number.
However, it would be simple to change Canvas.Brush.Color instead of drawing background yourself.
If you need, I can add similar hidden parameters to OnApplyStyleColor event.
OnDrawTextBack event has "hidden" parameters, including item number.
However, it would be simple to change Canvas.Brush.Color instead of drawing background yourself.
If you need, I can add similar hidden parameters to OnApplyStyleColor event.
-
- Site Admin
- Posts: 17564
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Yes, works fide but that way I only can paint the background depending on ParaStyle number. I must paint depending on certain items. Item numbers. It is alway the whole paragraph that contains different difficulty-levels of text. First item an all with SameAsPrev until next paragraph breakSergey Tkachenko wrote:OnDrawTextBack is for drawing background of text items.
If you need to draw something on paragraphs, use OnDrawParaBack.
-
- Site Admin
- Posts: 17564
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
OnDrawParaBack has hidden parameters as well:
http://www.trichview.com/help/idh_trvst ... aback.html :
TCustomRVData(Sender.RVData) is a document containing the item. Normally it is RichViewEdit.RVData, but may be a table cell or RVData of cell inplace editor.
Sender.ItemNo is the index of the last item in the paragraph. To get the first item:
http://www.trichview.com/help/idh_trvst ... aback.html :
TCustomRVData(Sender.RVData) is a document containing the item. Normally it is RichViewEdit.RVData, but may be a table cell or RVData of cell inplace editor.
Sender.ItemNo is the index of the last item in the paragraph. To get the first item:
Code: Select all
FirstItemNo := Sender.ItemNo;
for i := FirstItemNo downto 0 do
if TCustomRVData(Sender.RVData).IsParaStart(i) then begin
FirstItemNo := i;
break;
end;