Discussing the article: "MQL5 Trading Tools (Part 14): Pixel-Perfect Scrollable Text Canvas with Antialiasing and Rounded Scrollbar"
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Check out the new article: MQL5 Trading Tools (Part 14): Pixel-Perfect Scrollable Text Canvas with Antialiasing and Rounded Scrollbar.
In this article, we enhance the canvas-based price dashboard in MQL5 by adding a pixel-perfect scrollable text panel for usage guides, overcoming native scrolling limitations through custom antialiasing and a rounded scrollbar design with hover-expand functionality. The text panel supports themed backgrounds with opacity, dynamic line wrapping for content like instructions and contacts, and interactive navigation via up/down buttons, slider dragging, and mouse wheel scrolling within the body area.
The pixel-perfect scrollable text canvas framework addresses MQL5's limitations in native text scrolling by utilizing custom pixel-level rendering with antialiasing for smooth edges, a rounded scrollbar that expands on hover for improved usability, and interactive elements such as up/down buttons and a draggable slider to navigate long content, including usage guides. It supports themed backgrounds with adjustable opacity, dynamic line wrapping to fit panel width while preserving colors for headings/links, and mouse wheel scrolling within the text body to bypass chart zoom interference, ensuring precise control without relying on built-in objects. Integration with the dashboard enables seamless updates on events, maintaining consistency across graph/stats/, and text panels for a cohesive monitoring tool.
We chose not to use the static MQL5 objects for the lines and want to fully explore the capabilities of the canvas. The good thing is that with the canvas, we don't really need to worry about text overflow over the borders, like we were experiencing with the past articles where we used the native objects; the canvas clips the texts automatically, helping us achieve a website scroll effect. Also, the rounded dynamic scrollbar was inspired by the appealing MetaQuotes terminals overlay that they have in the recent updates. Have a look at what we want to achieve at the end from the inspiration.
Author: Allan Munene Mutiiria