static void iMatrixEditChooseElement(Ihandle* ih) { int drop = iMatrixEditCallDropdownCb(ih, ih->data->lines.focus_cell, ih->data->columns.focus_cell); if(drop) ih->data->datah = ih->data->droph; else { char* value; ih->data->datah = ih->data->texth; /* dropdown values are set by the user in DROP_CB. text value is set here from cell contents. */ value = iupMatrixCellGetValue(ih, ih->data->lines.focus_cell, ih->data->columns.focus_cell); if (!value) value = ""; IupStoreAttribute(ih->data->texth, "VALUE", value); IupStoreAttribute(ih->data->texth, "PREVIOUSVALUE", value); } }
static void iMatrixEditChooseElement(Ihandle* ih) { int drop = iMatrixEditCallDropdownCb(ih, ih->data->edit_lin, ih->data->edit_col); if (drop) ih->data->datah = ih->data->droph; else { char* value; ih->data->datah = ih->data->texth; /* dropdown values are set by the user in DROP_CB. text value is set here from cell contents. */ iupAttribSet(ih, "EDITVALUE", "Yes"); value = iupMatrixGetValueDisplay(ih, ih->data->edit_lin, ih->data->edit_col); iupAttribSet(ih, "EDITVALUE", NULL); if (!value) value = ""; IupStoreAttribute(ih->data->texth, "VALUE", value); IupStoreAttribute(ih->data->texth, "PREVIOUSVALUE", value); } }