Can anyone please tell me how to remove a text caret from an isigraph
control, once used? glclear doesn't do it, and I can't find any other way -
in desperation tried glcaret 0 and glcaret '', even though undocumented.
Re-invoking glcaret with zero width and height is the best that I can
achieve, but this still leaves a single pixel flashing.
Maybe I have missed something, but if not, could removal of any previously
used caret perhaps be incorporated into the scope of glclear?
---------------------------------------------------------------
require 'gl2'
coinsert 'jgl2'
tcaret_run=: 3 : 0
wd 'pc tcaret closeok;'
wd 'xywh 10 10 100 20;cc g isigraph;'
wd 'xywh 10 40 100 10;cc clear button;cn "clear";'
wd 'pmove 150 100 10 10;pas 5 5;pshow;'
text=. 'text caret won''t go away'
'tx ty'=: 10 15
gltextxy tx,ty
gltext text
'tw th'=: glqextent text
glcaret (tx+tw),ty,1,th
)
tcaret_clear_button=: 3 : 0
wd 'setfocus g'
glclear ''
NB. glcaret tx,ty, 0 0 NB. leaves a single pixel flashing
NB. glcaret 0 NB. error
NB. glcaret '' NB. error
glpaint ''
)
tcaret_run ''
Internal Virus Database is out of date.
Checked by AVG - http://www.avg.com
Version: 8.0.136 / Virus Database: 270.4.10/1551 - Release Date: 14/07/2008
06:49
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm