[ltk-user] Function for setting insertion cursor in entry widget

Sudhir Shenoy sshenoy at gol.com
Wed Mar 21 03:50:11 UTC 2007


Hi,

The command to set the cursor position in an entry widget (icursor)  
is missing in LTK. Here is a function that implements it. I don't  
know the way to do it for a text widget, though.

(defmethod (setf cursor-index) (idx (e entry))
   (format-wish "senddata [~a icursor ~(~a~)]" (widget-path e) idx))

With this, (setf (cursor-index entry-widget) :end) will ensure that  
the insertion cursor is at the end of the field.

Cheers
Sudhir




More information about the ltk-user mailing list