@pymethod int|PyCComboBox|InsertString|Insert a string into a combobox.
| 962 | |
| 963 | // @pymethod int|PyCComboBox|InsertString|Insert a string into a combobox. |
| 964 | static PyObject * |
| 965 | PyCComboBox_insert_string(PyObject *self, PyObject *args) |
| 966 | { |
| 967 | int pos; |
| 968 | PyObject *ob; |
| 969 | if (!PyArg_ParseTuple(args, "iO", |
| 970 | &pos, // @pyparm int|pos||The zero based index in the combobox to insert the new string |
| 971 | &ob)) // @pyparm any|object||The object to be added to the combobox |
| 972 | return NULL; |
| 973 | CComboBox *pLB = GetCombo(self); |
| 974 | if (!pLB) |
| 975 | return NULL; |
| 976 | CString cstrRepr = GetReprText(ob); |
| 977 | GUI_BGN_SAVE; |
| 978 | int rc = pLB->InsertString( pos, cstrRepr ); |
| 979 | GUI_END_SAVE; |
| 980 | return Py_BuildValue("i", rc); // @pyseemfc CComboBox|InsertString |
| 981 | // @rdesc The zero based index of the new string added. |
| 982 | } |
| 983 | // @pymethod |PyCComboBox|ResetContent|Clear all the items from a combobox. |
| 984 | static PyObject * |
| 985 | PyCComboBox_reset_content(PyObject *self, PyObject *args) |
nothing calls this directly
no test coverage detected