Get height of TMainMenu
Original Reporter info from Mantis: dezlov
-
Reporter name: Denis Kozlov
Original Reporter info from Mantis: dezlov
- Reporter name: Denis Kozlov
Description:
Developers often need to take into account the hight of the main menu (TMainMenu) when positioning and resizing components on the form and the form itself.
There is no documented or straight forward way for doing so currently, as far as I know. For this reason I propose to add a read-only published property like so:
-----------------------------------------------------
TMainMenu = class(TMenu)
private
function GetHeight: Integer;
...
published
property Height: Integer read GetHeight;
...
end;
function TMainMenu.GetHeight: Integer;
begin
Result := LCLIntf.GetSystemMetrics(SM_CYMENU);
end;
-----------------------------------------------------
Mantis conversion info:
- Mantis ID: 26054
- Build: 1.2.0 r44303 FPC 2.6.2
- Version: 1.2.0
- Fixed in revision: r44834 (#cda481e9)
- Monitored by: » dezlov (Denis Kozlov)