@pymethod int|PyCListBox|AddString|Adds a string to a listbox.
| 288 | } |
| 289 | // @pymethod int|PyCListBox|AddString|Adds a string to a listbox. |
| 290 | static PyObject * |
| 291 | PyCListBox_add_string(PyObject *self, PyObject *args) |
| 292 | { |
| 293 | CListBox *pLB = GetListBox(self); |
| 294 | if (!pLB) |
| 295 | return NULL; |
| 296 | PyObject *ob; |
| 297 | if (!PyArg_ParseTuple(args, "O", &ob )) // @pyparm any|object||Any object. If not a string, __str__, __repr__ or a default repr() will be used |
| 298 | return NULL; |
| 299 | CString cstrRepr = GetReprText(ob); |
| 300 | //@pyseemfc CListBox|AddString |
| 301 | GUI_BGN_SAVE; |
| 302 | int rc=pLB->AddString( cstrRepr ); |
| 303 | GUI_END_SAVE; |
| 304 | if (IS_LB_ERR(rc)) |
| 305 | RETURN_ERR("PyCListBox.AddString failed"); |
| 306 | return Py_BuildValue("i", rc); |
| 307 | //@rdesc The zero based index of the new string. |
| 308 | } |
| 309 | // @pymethod int|PyCListBox|DeleteString|Deletes an item from a listbox. |
| 310 | static PyObject * |
| 311 | PyCListBox_delete_string(PyObject *self, PyObject *args) |
nothing calls this directly
no test coverage detected