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

Function PyCListCtrl_GetColumn

Pythonwin/win32ctrlList.cpp:368–387  ·  view source on GitHub ↗

@pymethod |PyCListCtrl|GetColumn|Retrieves the details of a column in the control.

Source from the content-addressed store, hash-verified

366
367// @pymethod <o LV_COLUMN>|PyCListCtrl|GetColumn|Retrieves the details of a column in the control.
368PyObject *PyCListCtrl_GetColumn( PyObject *self, PyObject *args )
369{
370 int col;
371 if (!PyArg_ParseTuple( args, "i:GetColumn",
372 &col)) // @pyparm int|column||The index of the column whose attributes are to be retrieved.
373 return NULL;
374 CListCtrl *pList = GetListCtrl(self);
375 if (!pList) return NULL;
376 TCHAR textBuf[256];
377 LV_COLUMN lvItem;
378 lvItem.pszText = textBuf;
379 lvItem.cchTextMax = sizeof(textBuf)/sizeof(TCHAR);
380 lvItem.mask = LVCF_FMT | LVCF_SUBITEM | LVCF_TEXT | LVCF_WIDTH;
381 GUI_BGN_SAVE;
382 BOOL ok = pList->GetColumn( col, &lvItem);
383 GUI_END_SAVE;
384 if (!ok)
385 RETURN_ERR("GetColumn failed");
386 return PyWinObject_FromLV_COLUMN(&lvItem);
387}
388
389// @pymethod int|PyCListCtrl|DeleteColumn|Deletes the specified column from the list control.
390PyObject *PyCListCtrl_DeleteColumn( PyObject *self, PyObject *args )

Callers

nothing calls this directly

Calls 3

GetListCtrlFunction · 0.85
GetColumnMethod · 0.80

Tested by

no test coverage detected