X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/94082a71f84ab25defd0b31ff60e9993b73df66a..b89f0cb06a187c6fe7e75ab5aa359b019b8ff766:/wxPython/src/gtk/controls2.py diff --git a/wxPython/src/gtk/controls2.py b/wxPython/src/gtk/controls2.py index c23d04975b..4e4e200003 100644 --- a/wxPython/src/gtk/controls2.py +++ b/wxPython/src/gtk/controls2.py @@ -7,6 +7,8 @@ from windows import * from gdi import * +from fonts import * + from clip_dnd import * from events import * @@ -606,6 +608,20 @@ class wxListCtrlPtr(wxControlPtr): def ScrollList(self, *_args, **_kwargs): val = apply(controls2c.wxListCtrl_ScrollList,(self,) + _args, _kwargs) return val + def SetItemTextColour(self, *_args, **_kwargs): + val = apply(controls2c.wxListCtrl_SetItemTextColour,(self,) + _args, _kwargs) + return val + def GetItemTextColour(self, *_args, **_kwargs): + val = apply(controls2c.wxListCtrl_GetItemTextColour,(self,) + _args, _kwargs) + if val: val = wxColourPtr(val) ; val.thisown = 1 + return val + def SetItemBackgroundColour(self, *_args, **_kwargs): + val = apply(controls2c.wxListCtrl_SetItemBackgroundColour,(self,) + _args, _kwargs) + return val + def GetItemBackgroundColour(self, *_args, **_kwargs): + val = apply(controls2c.wxListCtrl_GetItemBackgroundColour,(self,) + _args, _kwargs) + if val: val = wxColourPtr(val) ; val.thisown = 1 + return val def SortItems(self, *_args, **_kwargs): val = apply(controls2c.wxListCtrl_SortItems,(self,) + _args, _kwargs) return val @@ -653,6 +669,16 @@ class wxListCtrlPtr(wxControlPtr): def ClearColumnImage(self, col): self.SetColumnImage(col, -1) + + def Append(self, entry): + '''Append an item to the list control. The entry parameter should be a + sequence with an item for each column''' + if len(entry): + pos = self.GetItemCount() + self.InsertStringItem(pos, str(entry[0])) + for i in range(1, len(entry)): + self.SetStringItem(pos, i, str(entry[i])) + return pos class wxListCtrl(wxListCtrlPtr): def __init__(self,*_args,**_kwargs): @@ -1202,7 +1228,6 @@ class wxGenericDirCtrlPtr(wxControlPtr): return val def GetTreeCtrl(self, *_args, **_kwargs): val = apply(controls2c.wxGenericDirCtrl_GetTreeCtrl,(self,) + _args, _kwargs) - if val: val = wxTreeCtrlPtr(val) return val def GetFilterListCtrl(self, *_args, **_kwargs): val = apply(controls2c.wxGenericDirCtrl_GetFilterListCtrl,(self,) + _args, _kwargs) @@ -1403,3 +1428,6 @@ wxDIRCTRL_DIR_ONLY = controls2c.wxDIRCTRL_DIR_ONLY wxDIRCTRL_SELECT_FIRST = controls2c.wxDIRCTRL_SELECT_FIRST wxDIRCTRL_SHOW_FILTERS = controls2c.wxDIRCTRL_SHOW_FILTERS wxDIRCTRL_3D_INTERNAL = controls2c.wxDIRCTRL_3D_INTERNAL +wxDIRCTRL_EDIT_LABELS = controls2c.wxDIRCTRL_EDIT_LABELS +wxID_TREECTRL = controls2c.wxID_TREECTRL +wxID_FILTERLISTCTRL = controls2c.wxID_FILTERLISTCTRL