windowStyle()

The function windowStyle() can be used to deactivate the control menu or only the minimize box

Synopsis

int windowStyle(string moduleName, string panelName, bool systemMenu, bool minimizeBox);

Parameters

Parameter Description
moduleName The name of the module.
panelName The name of the panel.
systemMenu Specifies whether the control menu should be displayed or not. If the parameter is set to 0, the control menu is not displayed.
minimizeBox Specifies whether the minimize box should be displayed or not. If the parameter is set to 0, the minimize box is not displayed.

Description

Opens the specified panel in the specified module without the control menu or without the minimize box.

Please note that the result accieved with windowstyle() is dependent on the platform ( the OS, respectively the Window manager). Not all Platforms allow changes to the displayed buttons in the title bar or have combinations which are not allowed.

E.g.:

  • Windows 10: allows minimize=true, but won't allow sysmenu=false
  • Linux (KDE-kwin_x11 oder parent system): This function cannot be used. Niether the sysmenu nor the min/max buttons can be hidden.
  • Linux (icewm oder xfwm4): all combinations work.
  • Linux (gnome-shell): sysmenu has no result (cannot be deactivated).

Example

In the first example below a panel is opened without the control menu. In the second example a panel is opened with the control menu but without the minimize box.

main()
{
  DebugN(myModuleName());
  DebugN(myPanelName());
  //the control menu is not shown
  windowStyle(myModuleName(),myPanelName(),0,0);
}
main()
{
  DebugN(myModuleName());
  DebugN(myPanelName());
  //the minimize box is not shown
  windowStyle(myModuleName(),myPanelName(),1,0);
}

Assignment

Graphic functions

Availability

UI