I have developed several finite element related applications that all create two windows each.
The main window in each application contains a graphical display of the FE model, with which users can interact and interrogate their models. The second window uses %cw to display the results of interrogations as text.
I wish to give users the capability to copy text from this window into other applications like word. However if I just have the standard call back function 'COPY' it is always greyed out when text has been highlighted using the mouse cursor. I then found out by trial and error that if I added the 'PASTE' call back, the 'COPY' is still initially greyed out but the 'PASTE' usually isn't. So I click on 'PASTE' and then usually 'COPY' is no longer greyed out and allows me to copy and paste text into other apps.
However, this method is rather hit and miss, sometimes working and sometimes not, also the text transferred into the clipboard buffer is very often truncated from what was highlighted in the %cw window. This has frustrated me for several years and any help would be most appreciated.
These extracts are taken from the most simple of my programs:-
Text window using %cw :-
i=winio@('%ww %ca@ %sp &',PROG_NAME,0,0)
i=winio@('%mi[ICON_1]&')
i=winio@('%mn[&Edit[&Copy,&Paste]]&','COPY','PASTE')
i=winio@('%pv%80.20cw[vscroll,hscroll]%bg[grey]%lw',6,iwrite6)
Graphics window :-
i=winio@('%ca@&',PROG_NAME)
i=winio@('%mi[ICON_1]&')
i=winio@('%`9cu&',CURSOR_ARROW,CURSOR_IBEAM,CURSOR_WAIT,
*CURSOR_CROSS,CURSOR_UPARROW,CURSOR_SIZE,CURSOR_ICON,
*CURSOR_SIZEWE,CURSOR_SIZENS,K_TYPE)
i=winio@('%ww[no_border]&')
i=winio@('%pv%`^gr[black,user_resize,full_mouse_input]&',
*IX_PC,IY_PC,IHNDL,CALLBACK)
i=winio@('%lw',ictrl)
:laugh: