.. wxPython Phoenix documentation

   This file was generated by Phoenix's sphinx generator and associated
   tools, do not edit by hand.

   Copyright: (c) 2011-2025 by Total Control Software
   License:   wxWindows License

.. include:: headings.inc



.. _wx.PreferencesPage:

==========================================================================================================================================
|phoenix_title|  **wx.PreferencesPage**
==========================================================================================================================================

One page of preferences dialog. 
         

This is the base class for implementation of application's preferences. Its methods return various properties of the page, such as title or icon. The actual page is created by :meth:`~wx.PreferencesPage.CreateWindow`. 






         



.. versionadded:: 2.9.5 
     







.. seealso:: :ref:`wx.StockPreferencesPage`  







|

|class_hierarchy| Class Hierarchy
=================================

.. raw:: html

   <div class="collabsible-wrapper">
      <input id="collapsible-inheritance" class="collapsible-checkbox" type="checkbox">
      <label for="collapsible-inheritance" tabindex="0" title="Show inheritance diagram" class="collapsible-label">Inheritance diagram for class <strong>PreferencesPage</strong>:</label>
      <div class="collapsible-content">
         <p class="graphviz">
            <center><img src="_static/images/inheritance/wx.PreferencesPage_inheritance.svg" alt="Inheritance diagram of PreferencesPage" usemap="#dummy" class="inheritance invert-in-dark-mode"/></center>
            <map id="dummy" name="dummy"> <area shape="rect" id="node1" href="wx.PreferencesPage.html" title="One page of preferences dialog." alt="" coords="5,5,182,34"/> </map> 
         </p>
      </div>
   </div>
   <script type="text/javascript" src="_static/inheritancetoggle.js"></script>



|


|sub_classes| Known Subclasses
==============================

:ref:`wx.StockPreferencesPage`

|


|method_summary| Methods Summary
================================

================================================================================ ================================================================================
:meth:`~wx.PreferencesPage.__init__`                                             Constructor.
:meth:`~wx.PreferencesPage.CreateWindow`                                         Create a window for this page.
:meth:`~wx.PreferencesPage.GetIcon`                                              Return the icon to be used for the page on some platforms.
:meth:`~wx.PreferencesPage.GetLargeIcon`                                         
:meth:`~wx.PreferencesPage.GetName`                                              Return name of the page.
================================================================================ ================================================================================


|


|property_summary| Properties Summary
=====================================

================================================================================ ================================================================================
:attr:`~wx.PreferencesPage.Icon`                                                 See :meth:`~wx.PreferencesPage.GetIcon`
:attr:`~wx.PreferencesPage.LargeIcon`                                            See :meth:`~wx.PreferencesPage.GetLargeIcon`
:attr:`~wx.PreferencesPage.Name`                                                 See :meth:`~wx.PreferencesPage.GetName`
================================================================================ ================================================================================


|


|api| Class API
===============


.. class:: wx.PreferencesPage(object)

   **Possible constructors**::

       PreferencesPage() -> None
       
   
   One page of preferences dialog.



   .. method:: __init__(self)

      Constructor. 
                 

      :rtype: `None`     








   .. method:: CreateWindow(self, parent)

      Create a window for this page. 
                 

      The window will be placed into the preferences dialog in platform-specific manner. Depending on the platform, this method may be called before showing the preferences window, when switching to its tab or even more than once. Don't make assumptions about the number of times or the specific time when it is called. 

      The caller takes ownership of the window. 

      :ref:`wx.Panel`  is usually used, but doesn't have to be. 




      :param `parent`: Parent window to use.   
      :type `parent`: wx.Window






      :rtype: :ref:`wx.Window`




                  





   .. method:: GetIcon(self)

      Return the icon to be used for the page on some platforms. 
                 

      Currently only used on macOS. 


                

      :rtype: :ref:`wx.BitmapBundle`







      .. versionadded:: 4.1/wxWidgets-3.1.6  
     







      .. note:: 

         This method is not pure virtual, but must be implemented on the platforms that require it (macOS). The preprocessor symbol  ``HAS_PREF_EDITOR_ICONS``   is defined if this method must be implemented.  








   .. method:: GetLargeIcon(self)




                

      :rtype: :ref:`wx.Bitmap`







      .. wxdeprecated:: 
         This function is deprecated, override :meth:`GetIcon`   instead.   








   .. method:: GetName(self)

      Return name of the page. 
                 

      The name is used for notebook tab's label, icon label etc., depending on the platform. 
                 

      :rtype: `str`








   .. attribute:: Icon

      See :meth:`~wx.PreferencesPage.GetIcon`


   .. attribute:: LargeIcon

      See :meth:`~wx.PreferencesPage.GetLargeIcon`


   .. attribute:: Name

      See :meth:`~wx.PreferencesPage.GetName`

