GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Table of Contents
  • wx.SystemSettings
  • Show Source
  • index
  • modules
  • next
  • previous
  • Home
  • Gallery
  • wx

This view

  • Original page
  • New address

GeezerVison is showing docs.wxpython.org — wx.SystemSettings — wxPython 4.3.2 Docs

phoenix_title wx.SystemSettings¶

wx.SystemSettings allows the application to ask for details about the system.

This can include settings such as standard colours, fonts, and user interface element sizes.

See also

wx.Font, wx.Colour, wx.SystemOptions


class_hierarchy Class Hierarchy¶

Inheritance diagram for class SystemSettings:

Inheritance diagram of SystemSettings


method_summary Methods Summary¶

__init__

Default constructor.

ExceedsDragThreshold

Check if the mouse moved far enough to start a drag operation.

GetAppearance

Returns the object describing the current system appearance.

GetColour

Returns a system colour.

GetFont

Returns a system font.

GetMetric

Returns the value of a system metric, or -1 if the metric is not supported on the current system.

GetScreenType

Returns the screen type.

HasFeature

Returns True if the port has certain feature.

SelectLightDark

Select one of the two colours depending on whether light or dark mode is used.


api Class API¶

class wx.SystemSettings(object)¶

Possible constructors:

SystemSettings() -> None

SystemSettings allows the application to ask for details about the system.


Methods¶

__init__(self)¶

Default constructor.

You don’t need to create an instance of wx.SystemSettings since all of its functions are static.

Return type:

None



static ExceedsDragThreshold(origin, current, win=None)¶

Check if the mouse moved far enough to start a drag operation.

This function simply checks if the mouse has travelled further than the configured drag threshold from the click position to consider that the user intends to drag something.

Parameters:
  • origin (wx.Point) – Position of the mouse click.

  • current (wx.Point) – Current position of the mouse.

  • win (wx.Window) – Window to use for determining the drag threshold. May be nullptr but it’s recommended to provide it, see GetMetric .

Return type:

bool

Added in version 4.3/wxWidgets-3.3.4.



static GetAppearance()¶

Returns the object describing the current system appearance.

Return type:

wx.SystemAppearance

Added in version 4.1/wxWidgets-3.1.3.



static GetColour(index)¶

Returns a system colour.

Parameters:

index (SystemColour) – Can be one of the wx.SystemColour enum values.

Return type:

wx.Colour

Returns:

The returned colour is always valid.



static GetFont(index)¶

Returns a system font.

Parameters:

index (SystemFont) – Can be one of the wx.SystemFont enum values.

Return type:

wx.Font

Returns:

The returned font is always valid.



static GetMetric(index, win=None)¶

Returns the value of a system metric, or -1 if the metric is not supported on the current system.

The value of win determines if the metric returned is a global value or a wx.Window based value, in which case it might determine the widget, the display the window is on, or something similar. The window given should be as close to the metric as possible (e.g. a wx.TopLevelWindow in case of the wx.SYS_CAPTION_Y metric).

index can be one of the wx.SystemMetric enum values.

win is a pointer to the window for which the metric is requested. Specifying the win parameter is encouraged, because some metrics on some ports are not supported without one, or they might be capable of reporting better values if given one. If a window does not make sense for a metric, one should still be given, as for example it might determine which displays cursor width is requested with wx.SYS_CURSOR_X.

Parameters:
  • index (SystemMetric)

  • win (wx.Window)

Return type:

int



static GetScreenType()¶

Returns the screen type.

The return value is one of the wx.SystemScreenType enum values.

Return type:

wx.SystemScreenType



static HasFeature(index)¶

Returns True if the port has certain feature.

See the wx.SystemFeature enum values.

Parameters:

index (SystemFeature)

Return type:

bool



static SelectLightDark(colForLight, colForDark)¶

Select one of the two colours depending on whether light or dark mode is used.

This is just a convenient helper using wx.SystemAppearance.IsDark to select between the two colours.

Parameters:
  • colForLight (wx.Colour) – Colour returned when using light appearance.

  • colForDark (wx.Colour) – Colour returned when using dark appearance, as detected by wx.SystemAppearance.IsDark .

Return type:

wx.Colour

Added in version 4.3/wxWidgets-3.3.0.

© Copyright 2012-2026, The wxPython Team. Created using Sphinx 9.1.0 and the python-docs-theme.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.