Skip to content

set_window_attrSetWindowAttrSetWindowAttrset_window_attrset_window_attr🔗

Short description🔗

set_window_attrSetWindowAttrSetWindowAttrset_window_attrset_window_attr — Set window characteristics.

Signature🔗

set_window_attr( string AttributeName, string AttributeValue )void SetWindowAttr( const HTuple& AttributeName, const HTuple& AttributeValue )static void HOperatorSet.SetWindowAttr( HTuple attributeName, HTuple attributeValue )def set_window_attr( attribute_name: str, attribute_value: Union[str, int] ) -> None

Herror set_window_attr( const char* AttributeName, const char* AttributeValue )

Herror T_set_window_attr( const Htuple AttributeName, const Htuple AttributeValue )

static void HSystem::SetWindowAttr( const HString& AttributeName, const HTuple& AttributeValue )

static void HSystem::SetWindowAttr( const HString& AttributeName, const HString& AttributeValue )

static void HSystem::SetWindowAttr( const char* AttributeName, const char* AttributeValue )

static void HSystem::SetWindowAttr( const wchar_t* AttributeName, const wchar_t* AttributeValue ) (Windows only)

static void HSystem.SetWindowAttr( string attributeName, HTuple attributeValue )

static void HSystem.SetWindowAttr( string attributeName, string attributeValue )

Description🔗

You may use set_window_attrSetWindowAttr to set specific characteristics of graphics windows. With it you may modify the following default parameters of a window:

  • ‘border_width’ Width of the window border in pixels. Is not implemented under Windows.

  • ‘border_color’ Color of the window border. Is not implemented under Windows.

  • ‘background_color’ Background color of the window.

  • ‘window_title’ Name of the window in the title bar.

Attention🔗

You have to call set_window_attrSetWindowAttr before calling open_windowOpenWindow.

Execution information🔗

Execution information
  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).

  • Multithreading scope: global (may be called from any thread).

  • Processed without parallelization.

Parameters🔗

AttributeNameattributeNameattribute_name (input_control) string → (string)HTuple (HString)HTuple (string)strHtuple (char*)

Name of the attribute that should be modified.

List of values: 'background_color', 'border_color', 'border_width', 'window_title'"background_color", "border_color", "border_width", "window_title"

AttributeValueattributeValueattribute_value (input_control) string → (string / integer)HTuple (HString / Hlong)HTuple (string / int / long)Union[str, int]Htuple (char* / Hlong)

Value of the attribute that should be set.

List of values: 0, 1, 2, 'MyName', 'black', 'default', 'white'0, 1, 2, "MyName", "black", "default", "white"

Result🔗

If the parameters are correct set_window_attrSetWindowAttr returns 2 (H_MSG_TRUE). If necessary an exception is raised.

Combinations with other operators🔗

Combinations

Possible predecessors

open_windowOpenWindow, set_drawSetDraw, set_colorSetColor, set_coloredSetColored, set_line_widthSetLineWidth

See also

open_windowOpenWindow, get_window_attrGetWindowAttr, set_window_paramSetWindowParam

Module🔗

Foundation