JVCL Help:TJvMarkupViewer.Paint

From Project JEDI Wiki
Jump to navigationJump to search
JEDI Visual Component Library Help

Search in JVCL Help

 
Search in all projects
 

Summary

Renders the HTML markup for the HTML-enabled control.


Pascal

 procedurePaint; override;


Description

Paint is an overridden method in TJvMarkupViewer that implements rendering of the HTML markup in Text for the HTML-enabled control.
Rendering uses the Canvas for the control to recalculate the position for HTML elements found in the Text property. HTML element positions are relative to the values specified in the MarginLeft, MarginRight, and MarginTop properties. The value in MarginBottom is also added to the overall total height of the rendered control. The right boundary for the control is adjusted to allow space for drawing the ScrollBar for the control.
BackColor is used to set the background and transparency colors for the rendered HTML elements.
To provide scrollability, drawing HTML elements is performed on the Canvas for a TBitmap instance. Changes to the position of the ScrollBar cause the visible portion of the bitmap to be repositioned in the client area for the control.
Internally, Paint uses TJvHTMLElementStack and TJvHTMLElement to calculate the flow and alignment of the HTML elements in the client area of the control. This includes wrapping of HTML elements that cannot be draw in their entirety on the current line.


See Also

TJvMarkupViewer.Text, TJvMarkupViewer.MarginLeft, TJvMarkupViewer.MarginRight, TJvMarkupViewer.MarginTop, TJvMarkupViewer.BackColor, TJvHTMLElementStack, TJvHTMLElement


About

Contribute to this help topic

This documentation wiki is based on the collaborative effort of Project JEDI users. Your edits are welcome in order to improve documentation quality: edit this page