Forum > Win32/64
[SOLVED] How to get the width for the size grip on TStatusBar?
dsiders:
--- Quote from: d7_2_laz on March 01, 2024, 03:12:42 pm ---@dsiders, i think the answer would point to Windows ThemeServices (within uxtheme).
I once had a similar demand regarding the metadarkstyle component (uwin32widgetsetdark.pas here).
Accepted approach here to determine the gripsize and it's position::
--- Code: Pascal [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---gripSize: TSize;...GetThemePartSize(TWin32ThemeServices(ThemeServices).Theme[teStatus], LCanvas.Handle, SP_GRIPPER, 0, @Rect, TS_DRAW, gripSize);Rect.Left:=Rect.Right - gripSize.cx;Rect.top:=Rect.Bottom - gripSize.cy;
I’d guess that might give an idea how to apply it analogously outside this context.
--- End quote ---
I did not think of ThemeServices. Thanks for the pointer (and the code).
Navigation
[0] Message Index
[*] Previous page