@pymethod int|PyCListBox|InsertString|Insert a string into a listbox.
| 352 | |
| 353 | // @pymethod int|PyCListBox|InsertString|Insert a string into a listbox. |
| 354 | static PyObject * |
| 355 | PyCListBox_insert_string(PyObject *self, PyObject *args) |
| 356 | { |
| 357 | int pos; |
| 358 | PyObject *ob; |
| 359 | if (!PyArg_ParseTuple(args, "iO", |
| 360 | &pos, // @pyparm int|pos||The zero based index in the listbox to insert the new string |
| 361 | &ob)) // @pyparm any|object||The object to be added to the listbox |
| 362 | return NULL; |
| 363 | CListBox *pLB = GetListBox(self); |
| 364 | if (!pLB) |
| 365 | return NULL; |
| 366 | CString cstrRepr = GetReprText(ob); |
| 367 | GUI_BGN_SAVE; |
| 368 | int rc=pLB->InsertString( pos, cstrRepr ); // @pyseemfc CListBox|InsertString |
| 369 | GUI_END_SAVE; |
| 370 | if (IS_LB_ERR(rc)) |
| 371 | RETURN_ERR("PyCListBox.InsertString failed"); |
| 372 | return Py_BuildValue("i", rc); |
| 373 | // @rdesc The zero based index of the new string added. |
| 374 | } |
| 375 | // @pymethod |PyCListBox|ResetContent|Clear all the items from a listbox. |
| 376 | static PyObject * |
| 377 | PyCListBox_reset_content(PyObject *self, PyObject *args) |
nothing calls this directly
no test coverage detected