Fixing rendering issues in TAdvMenus (part of the TMS VCL UI Pack for Delphi) usually involves managing High DPI scaling, VCL style conflicts, and proper layout architecture. Because these advanced menu components bypass native Windows drawing to provide modern gradients, animations, and custom styling, they are susceptible to visual anomalies if not configured correctly.
Below is a breakdown of the most common rendering issues in TAdvMainMenu / TAdvPopupMenu and how to resolve them. 1. Blurred or Squished Items in High DPI / 4K Displays
When dragging a Delphi application between monitors with different scale factors (e.g., 100% to 150% or 4K), menu items may fail to rescale, causing text overlapping or truncated boundaries.
The Component Hierarchy Fix: If you drop TAdvMainMenu directly onto a standard form, it struggle to calculate parent boundaries on 4K monitors. According to the TMS Advanced Toolbars & Menus Developers Guide, you should detach the menu from the form and place a TAdvDockPanel on your form instead. Add a TAdvToolBar to it, and assign your TAdvMainMenu to the toolbar’s Menu property. This ensures proper structural alignment and dynamic stretching.
Use Vector Images: Standard PNG or BMP glyphs will not scale automatically and will appear tiny or blurry at 150%+ DPI. Link a TVirtualImageList paired with a TAdvSVGImageCollection to ensure your icons remain sharp at any resolution.
Enable Per-Monitor v2: Ensure your application manifest is set to Per Monitor v2 in your Delphi Project Options to allow native high-DPI scaling hooks to pass down to the custom-drawn TMS controls. 2. Double Hotkeys or Broken Shortcut Text Rendering
In certain releases of the TMS VCL UI Pack, a rendering bug causes shortcut text (like Ctrl+N) to clip or duplicate over the main caption text when assigned to menu items. TADV Menu 150% DPI – TMS Support Center
Leave a Reply