Making SplitContainer Property Changes Redraw Correctly
Summary
This article explains how to make changes to a SplitContainer control’s properties appear immediately in a custom MQL5 interface library. Its central method is to redraw the control after property updates and to respect each element’s display state throughout drawing, event handling, and foreground ordering. The changes include general movement events, checks that prevent hidden or collapsed panels and separators from becoming visible, and behavior that keeps a fixed separator from reacting to mouse movement.
The article walks through class-level changes and reports a visual check in a running Expert Advisor: updated properties then affect the control’s appearance as intended. It also notes an unresolved issue: the separator does not always hide reliably after the pointer moves away, and its behavior is slated for further refinement. This is a user-interface engineering article, not a trading method or evidence about market behavior; its relevance is mainly to developers building interactive trading tools.
Key ideas
- A control’s appearance must be redrawn after its properties change if the visual state is to match the new values.
- Drawing and event handlers should respect whether an element is marked for display.
- Foreground-ordering logic should skip hidden elements so it does not accidentally reveal them.
- A fixed separator should not respond to mouse interactions intended for a movable separator.
- The visual demonstration confirms the property updates but also exposes an unreliable separator-hiding behavior.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.