Skip to content
All library documents

Adding Selection, Headers, and Resizing to Rendered Trading Tables

Article MQL5 articles

Summary

This article documents interface features for a rendered table component in a MetaTrader graphical library. It explains alternating row colors to improve readability, selectable rows that can be selected or cleared by clicking, and storage of the selected row’s index and first-column text. Selection triggers a custom event so other parts of an application can respond.

The update also adds column headers with hover and click color changes, adjusts displayed text to fit column width, and allows users to resize columns by dragging header borders. The table and headers are drawn on separate canvases, and mouse events are used to track selection and resizing. The article describes implementation concepts and example code rather than trading analysis or performance evidence. It notes that the rendered table remains under development, so the described interface is one stage in an evolving library.

Key ideas

  • Alternating row colors can make dense rendered tables easier to scan.
  • Selectable rows can expose both the selected index and the text in the first column.
  • Custom chart events let a table communicate row selections to other interface components.
  • Separate canvases support table content and interactive column headers.
  • Mouse handling enables column resizing and header color changes, while the library remains in development.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.