Ola, thank you for that idea Ranier. I tried your advice but all that does is ignore any edit actions. It does not prevent the edit mode from executing it's GUI actions. Let me try to explain this issue a little better:
Before I do anything, I have this: I double-click and this happens: I can change text here if I don't use IUP_IGNORE as suggested, but the text is IUP text instead of image, so the result is undefined that I know of. I have to press Escape to exit the edit mode which leads to this: So what I did worked but going into edit mode is an unnecessary annoyance. Thanks, Andrew On 2/20/2022 at 6:15 AM, Ranier Fonseca <ranier_...@hotmail.com> wrote: >De: Andrew Robinson <arobinso...@cox.net> >Enviado: sábado, 19 de fevereiro de 2022 17:48 >Para: IUP discussion list. >Assunto: [Iup-users] DoubleClick and IupMatrix > >>See the checkmarks? What I want to do is allow the end user to simply doubleclick on those cell and it will toggle from no checkmark, to single >checkmark to double checkmark and back to no checkmark. The problem is that a doubleclick also puts that cell into edit mode. Is there a way to >disable or escape the edit mode so this doesn't happen, but only for those particular cells (meaning Generic Name and Monomer can still be >editing by doubleclicking on them)? >I think yes. >In the callback function that controls actions of matrix, do you need use the col param, >to check what column is and take the right action. > >int iup_matrix_action_cb(const Ihandle * const ih, const int key, >const int lin, const int col, const int edition, const char * value) >{ > switch(key) { > case K_C: > return IUP_IGNORE; > break; > case K_Z: > return IUP_IGNORE; > break; > } /* switch*/ > if (col != 3 || col != 4) { > return IUP_IGNORE; > } > switch(col) { > case 3: // Generic Name > case 4: // Monomer > } > return IUP_DEFAULT; >} > >regards, >Ranier Vilela
_______________________________________________ Iup-users mailing list Iup-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/iup-users