.. 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.IconLocation:

==========================================================================================================================================
|phoenix_title|  **wx.IconLocation**
==========================================================================================================================================

:ref:`wx.IconLocation`  is a tiny class describing the location of an (external, i.e. 
         

not embedded into the application resources) icon. For most platforms it simply contains the file name but under some others (notably Windows) the same file may contain multiple icons and so this class also stores the index of the icon inside the file. 

In any case, its details should be of no interest to the application code and most of them are not even documented here (on purpose) as it is only meant to be used as an opaque class: the application may get the object of this class from somewhere and the only reasonable thing to do with it later is to create a :ref:`wx.Icon`  from it. 








         



.. seealso:: :ref:`wx.Icon`, :meth:`wx.FileType.GetIcon`     







|

|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>IconLocation</strong>:</label>
      <div class="collapsible-content">
         <p class="graphviz">
            <center><img src="_static/images/inheritance/wx.IconLocation_inheritance.svg" alt="Inheritance diagram of IconLocation" usemap="#dummy" class="inheritance invert-in-dark-mode"/></center>
            <map id="dummy" name="dummy"> <area shape="rect" id="node1" href="wx.IconLocation.html" title="wx.IconLocation  is a tiny class describing the location of an (external, i.e." alt="" coords="5,5,149,34"/> </map> 
         </p>
      </div>
   </div>
   <script type="text/javascript" src="_static/inheritancetoggle.js"></script>



|


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

================================================================================ ================================================================================
:meth:`~wx.IconLocation.__init__`                                                
:meth:`~wx.IconLocation.GetFileName`                                             
:meth:`~wx.IconLocation.GetIndex`                                                
:meth:`~wx.IconLocation.IsOk`                                                    Returns ``True`` if the object is valid, i.e. was properly initialized, and ``False`` otherwise.
:meth:`~wx.IconLocation.SetFileName`                                             
:meth:`~wx.IconLocation.SetIndex`                                                
:meth:`~wx.IconLocation.__bool__`                                                
:meth:`~wx.IconLocation.__nonzero__`                                             
================================================================================ ================================================================================


|


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

================================================================================ ================================================================================
:attr:`~wx.IconLocation.FileName`                                                See :meth:`~wx.IconLocation.GetFileName` and :meth:`~wx.IconLocation.SetFileName`
:attr:`~wx.IconLocation.Index`                                                   See :meth:`~wx.IconLocation.GetIndex` and :meth:`~wx.IconLocation.SetIndex`
================================================================================ ================================================================================


|


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


.. class:: wx.IconLocation(object)

   **Possible constructors**::

       IconLocation() -> None
       
       IconLocation(filename, num=0) -> None
       
   
   IconLocation is a tiny class describing the location of an
   (external, i.e.



   .. method:: __init__(self, *args, **kw)



      |overload| **Overloaded Implementations:**

      :html:`<hr class="overloadsep" /><br />`

      
      **__init__** `(self)`
      
      
      
      :rtype: `None`     
      
      
      
      
      
      
      
      :html:`<hr class="overloadsep" /><br />`

      
      **__init__** `(self, filename, num=0)`
      
      
      
      :rtype: `None`     
      
      
      
      
      
      
      
      :html:`<hr class="overloadsep" /><br />`






   .. method:: GetFileName(self)



      :rtype: `str`








   .. method:: GetIndex(self)



      :rtype: `int`








   .. method:: IsOk(self)

      Returns ``True`` if the object is valid, i.e. was properly initialized, and ``False`` otherwise. 
                 

      :rtype: `bool`








   .. method:: SetFileName(self, filename)




      :param `filename`: 
      :type `filename`: string




      :rtype: `None`     








   .. method:: SetIndex(self, num)



      :rtype: `None`     








   .. method:: __bool__(self)



      :rtype: `bool`








   .. method:: __nonzero__(self)



      :rtype: `bool`








   .. attribute:: FileName

      See :meth:`~wx.IconLocation.GetFileName` and :meth:`~wx.IconLocation.SetFileName`


   .. attribute:: Index

      See :meth:`~wx.IconLocation.GetIndex` and :meth:`~wx.IconLocation.SetIndex`

