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

Function PyCTreeCtrl_SetImageList

Pythonwin/win32ctrlTree.cpp:528–547  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

526
527// @pymethod int|PyCTreeCtrl|SetImageList|Assigns an image list to a list view control.
528PyObject *PyCTreeCtrl_SetImageList( PyObject *self, PyObject *args )
529{
530 CTreeCtrl *pList;
531 PyObject *obList;
532 int imageType;
533 if (!(pList=GetTreeCtrl(self)))
534 return NULL;
535 if (!PyArg_ParseTuple(args, "Oi:SetImageList",
536 &obList, // @pyparm <o PyCImageList>|imageList||The Image List to use.
537 &imageType )) // @pyparm int|imageType||Type of image list. It can be one of (COMMCTRL.) LVSIL_NORMAL, LVSIL_SMALL or LVSIL_STATE
538 return NULL;
539 CImageList *pImageList = PyCImageList::GetImageList(obList);
540 if (pImageList==NULL) return NULL;
541 GUI_BGN_SAVE;
542 CImageList *pOldList = pList->SetImageList( pImageList, imageType );
543 GUI_END_SAVE;
544 if (pOldList==NULL)
545 RETURN_NONE;
546 return ui_assoc_object::make( PyCImageList::type, pOldList )->GetGoodRet();
547}
548
549// @pymethod <o TV_ITEM>|PyCTreeCtrl|GetItem|Retrieves the details of an items attributes.
550PyObject *PyCTreeCtrl_GetItem( PyObject *self, PyObject *args )

Callers

nothing calls this directly

Calls 2

GetTreeCtrlFunction · 0.85
GetGoodRetMethod · 0.80

Tested by

no test coverage detected