[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: hiliting of editable text in newly created dialog?



>
>When I create a new dialog window one of the
>editable text boxes gets hilited if it has text in it (execute
>example below).  How can I prevent this hiliting? 
>-thanks, david
>
>(oneof *dialog*
>       :dialog-items (list (oneof *editable-text-dialog-item*
>                                  :dialog-item-text "hi there")))
>
>
;;;;HACK!!!

(defobfun (add-self-to-dialog *my-subclass-of-editable-text-dialog-item*)
(dialog)
  (usual-add-self-to-dialog dialog)
  (let ((teptr (ask dialog te-handle))
        (self (self))
       )
    (ask dialog (set-current-editable-text self))  ;Maybe already done, so
unneeded.
    (_TESetSelect :long 0 :long 0 :ptr teptr)
    ;Hmmmm.  Maybe these constants (0) need to be replaced by a (let
((start 0) (end 0)...?
) )

This should get you started.   You may be able to do a test and see if this
is the _1st_ editable-text, which is probably the only one for which the
_TESetSelect is done by MACL to be the whole text.

"TANSTAAFL" Rich lynch@aristotle.ils.nwu.edu