]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/msw/combo.py
Elippsis and markup support for wxStaticText
[wxWidgets.git] / wxPython / src / msw / combo.py
index 9b15b384e3e83b9acfeb5b12df137a86f6899e78..17854ae6d5db5207e13dea4f1cc99df4acd1935f 100644 (file)
@@ -65,6 +65,9 @@ __docfilter__ = wx.__DocFilter(globals())
 CC_BUTTON_OUTSIDE_BORDER = _combo.CC_BUTTON_OUTSIDE_BORDER
 CC_POPUP_ON_MOUSE_UP = _combo.CC_POPUP_ON_MOUSE_UP
 CC_NO_TEXT_AUTO_SELECT = _combo.CC_NO_TEXT_AUTO_SELECT
 CC_BUTTON_OUTSIDE_BORDER = _combo.CC_BUTTON_OUTSIDE_BORDER
 CC_POPUP_ON_MOUSE_UP = _combo.CC_POPUP_ON_MOUSE_UP
 CC_NO_TEXT_AUTO_SELECT = _combo.CC_NO_TEXT_AUTO_SELECT
+CC_BUTTON_STAYS_DOWN = _combo.CC_BUTTON_STAYS_DOWN
+CC_FULL_BUTTON = _combo.CC_FULL_BUTTON
+CC_BUTTON_COVERS_BORDER = _combo.CC_BUTTON_COVERS_BORDER
 CC_MF_ON_BUTTON = _combo.CC_MF_ON_BUTTON
 CC_MF_ON_CLICK_AREA = _combo.CC_MF_ON_CLICK_AREA
 class ComboCtrlFeatures(object):
 CC_MF_ON_BUTTON = _combo.CC_MF_ON_BUTTON
 CC_MF_ON_CLICK_AREA = _combo.CC_MF_ON_CLICK_AREA
 class ComboCtrlFeatures(object):
@@ -299,7 +302,7 @@ class ComboCtrl(_core.Control):
 
         Extends popup size horizontally, relative to the edges of the combo
         control.  Values are given in pixels, and the defaults are zero.  It
 
         Extends popup size horizontally, relative to the edges of the combo
         control.  Values are given in pixels, and the defaults are zero.  It
-        is up to th epopup to fully take these values into account.
+        is up to thpopup to fully take these values into account.
         """
         return _combo.ComboCtrl_SetPopupExtents(*args, **kwargs)
 
         """
         return _combo.ComboCtrl_SetPopupExtents(*args, **kwargs)
 
@@ -498,6 +501,10 @@ class ComboCtrl(_core.Control):
         """SetCtrlMainWnd(self, Window wnd)"""
         return _combo.ComboCtrl_SetCtrlMainWnd(*args, **kwargs)
 
         """SetCtrlMainWnd(self, Window wnd)"""
         return _combo.ComboCtrl_SetCtrlMainWnd(*args, **kwargs)
 
+    def GetMainWindowOfCompositeControl(*args, **kwargs):
+        """GetMainWindowOfCompositeControl(self) -> Window"""
+        return _combo.ComboCtrl_GetMainWindowOfCompositeControl(*args, **kwargs)
+
     def GetFeatures(*args, **kwargs):
         """
         GetFeatures() -> int
     def GetFeatures(*args, **kwargs):
         """
         GetFeatures() -> int
@@ -539,6 +546,21 @@ class ComboCtrl(_core.Control):
         """
         return _combo.ComboCtrl_AnimateShow(*args, **kwargs)
 
         """
         return _combo.ComboCtrl_AnimateShow(*args, **kwargs)
 
+    PopupControl = property(GetPopupControl,SetPopupControl) 
+    PopupWindow = property(GetPopupWindow) 
+    TextCtrl = property(GetTextCtrl) 
+    Button = property(GetButton) 
+    Value = property(GetValue,SetValue) 
+    InsertionPoint = property(GetInsertionPoint) 
+    CustomPaintWidth = property(GetCustomPaintWidth,SetCustomPaintWidth) 
+    ButtonSize = property(GetButtonSize) 
+    TextIndent = property(GetTextIndent,SetTextIndent) 
+    TextRect = property(GetTextRect) 
+    BitmapNormal = property(GetBitmapNormal) 
+    BitmapPressed = property(GetBitmapPressed) 
+    BitmapHover = property(GetBitmapHover) 
+    BitmapDisabled = property(GetBitmapDisabled) 
+    PopupWindowState = property(GetPopupWindowState) 
 _combo.ComboCtrl_swigregister(ComboCtrl)
 
 def PreComboCtrl(*args, **kwargs):
 _combo.ComboCtrl_swigregister(ComboCtrl)
 
 def PreComboCtrl(*args, **kwargs):
@@ -895,5 +917,91 @@ def PreOwnerDrawnComboBox(*args, **kwargs):
     val = _combo.new_PreOwnerDrawnComboBox(*args, **kwargs)
     return val
 
     val = _combo.new_PreOwnerDrawnComboBox(*args, **kwargs)
     return val
 
+class BitmapComboBox(OwnerDrawnComboBox):
+    """
+    A combobox that displays a bitmap in front of the list items. It
+    currently only allows using bitmaps of one size, and resizes itself so
+    that a bitmap can be shown next to the text field.
+    """
+    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
+    __repr__ = _swig_repr
+    def __init__(self, *args, **kwargs): 
+        """
+        __init__(self, Window parent, int id=-1, String value=EmptyString, 
+            Point pos=DefaultPosition, Size size=DefaultSize, 
+            wxArrayString choices=wxPyEmptyStringArray, 
+            long style=0, Validator validator=DefaultValidator, 
+            String name=wxBitmapComboBoxNameStr) -> BitmapComboBox
+
+        Standard constructor
+        """
+        _combo.BitmapComboBox_swiginit(self,_combo.new_BitmapComboBox(*args, **kwargs))
+        self._setOORInfo(self);
+
+    def Create(*args, **kwargs):
+        """
+        Create(self, Window parent, int id=-1, String value=EmptyString, 
+            Point pos=DefaultPosition, Size size=DefaultSize, 
+            wxArrayString choices=wxPyEmptyStringArray, 
+            long style=0, Validator validator=DefaultValidator, 
+            String name=wxBitmapComboBoxNameStr) -> bool
+
+        Create the UI object, and other initialization.
+        """
+        return _combo.BitmapComboBox_Create(*args, **kwargs)
+
+    def Append(*args, **kwargs):
+        """
+        Append(self, String item, Bitmap bitmap=wxNullBitmap, PyObject clientData=None) -> int
+
+        Adds the item to the control, associating the given data with the item
+        if not None.  The return value is the index of the newly added item.
+        """
+        return _combo.BitmapComboBox_Append(*args, **kwargs)
+
+    def GetItemBitmap(*args, **kwargs):
+        """
+        GetItemBitmap(self, int n) -> Bitmap
+
+        Returns the image of the item with the given index.
+        """
+        return _combo.BitmapComboBox_GetItemBitmap(*args, **kwargs)
+
+    def Insert(*args, **kwargs):
+        """
+        Insert(self, String item, Bitmap bitmap, int pos, PyObject clientData=None) -> int
+
+        Insert an item into the control before the item at the ``pos`` index,
+        optionally associating some data object with the item.
+        """
+        return _combo.BitmapComboBox_Insert(*args, **kwargs)
+
+    def SetItemBitmap(*args, **kwargs):
+        """
+        SetItemBitmap(self, int n, Bitmap bitmap)
+
+        Sets the image for the given item.
+        """
+        return _combo.BitmapComboBox_SetItemBitmap(*args, **kwargs)
+
+    def GetBitmapSize(*args, **kwargs):
+        """
+        GetBitmapSize(self) -> Size
+
+        Returns size of the image used in list.
+        """
+        return _combo.BitmapComboBox_GetBitmapSize(*args, **kwargs)
+
+_combo.BitmapComboBox_swigregister(BitmapComboBox)
+
+def PreBitmapComboBox(*args, **kwargs):
+    """
+    PreBitmapComboBox() -> BitmapComboBox
+
+    2-phase create constructor.
+    """
+    val = _combo.new_PreBitmapComboBox(*args, **kwargs)
+    return val
+