MCPcopy Create free account
hub / github.com/mhammond/pywin32 / PyCListCtrl_SetImageList

Function PyCListCtrl_SetImageList

Pythonwin/win32ctrlList.cpp:346–365  ·  view source on GitHub ↗

@pymethod int|PyCListCtrl|SetImageList|Assigns an image list to a list view control.

Source from the content-addressed store, hash-verified

344
345// @pymethod int|PyCListCtrl|SetImageList|Assigns an image list to a list view control.
346PyObject *PyCListCtrl_SetImageList( PyObject *self, PyObject *args )
347{
348 CListCtrl *pList;
349 PyObject *obList;
350 int imageType;
351 if (!(pList=GetListCtrl(self)))
352 return NULL;
353 if (!PyArg_ParseTuple(args, "Oi:SetImageList",
354 &obList, // @pyparm <o PyCImageList>|imageList||The Image List to use.
355 &imageType )) // @pyparm int|imageType||Type of image list. It can be one of (COMMCTRL.) LVSIL_NORMAL, LVSIL_SMALL or LVSIL_STATE
356 return NULL;
357 CImageList *pImageList = PyCImageList::GetImageList(obList);
358 if (pImageList==NULL) return NULL;
359 GUI_BGN_SAVE;
360 CImageList *pOldList = pList->SetImageList( pImageList, imageType );
361 GUI_END_SAVE;
362 if (pOldList==NULL)
363 RETURN_NONE;
364 return ui_assoc_object::make( PyCImageList::type, pOldList )->GetGoodRet();
365}
366
367// @pymethod <o LV_COLUMN>|PyCListCtrl|GetColumn|Retrieves the details of a column in the control.
368PyObject *PyCListCtrl_GetColumn( PyObject *self, PyObject *args )

Callers

nothing calls this directly

Calls 2

GetListCtrlFunction · 0.85
GetGoodRetMethod · 0.80

Tested by

no test coverage detected