Path: csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: "Karl-Heinz" Newsgroups: comp.lang.clipper.visual-objects Subject: Re: Cursor position in a short SingleLineEdit Date: Wed, 15 Mar 2017 08:01:35 +0100 Lines: 32 Message-ID: References: <91b5b94f-c406-4699-be07-8ee2988a7e0a@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset="UTF-8"; reply-type=original Content-Transfer-Encoding: 7bit X-Trace: individual.net ZZvJakjPVA2A4Df8/JtuWAmxhwa36v4ST8kd2bR5E42Uw0cbI= Cancel-Lock: sha1:60I7+Sdz8mfSzekHHVwTlDVmmAk= In-Reply-To: <91b5b94f-c406-4699-be07-8ee2988a7e0a@googlegroups.com> X-Priority: 3 X-MSMail-Priority: Normal Importance: Normal X-Newsreader: Microsoft Windows Live Mail 16.4.3564.1216 X-MimeOLE: Produced By Microsoft MimeOLE V16.4.3564.1216 Xref: csiph.com comp.lang.clipper.visual-objects:10290 Hi Henry, > > The text in the SLE is longer then the control itself. > i gave it a try using a modified EditFocusChange(). No matter if the sle gains or looses the focus, the start of the text is now visible. METHOD EditFocusChange(oEditFocusChangeEvent) CLASS DlgTest LOCAL oControl AS Control LOCAL lGotFocus AS LOGIC oControl := IIF(oEditFocusChangeEvent == NULL_OBJECT, NULL_OBJECT, oEditFocusChangeEvent:Control) lGotFocus := IIF(oEditFocusChangeEvent == NULL_OBJECT, FALSE, oEditFocusChangeEvent:GotFocus) SUPER:EditFocusChange(oEditFocusChangeEvent) //Put your changes here IF IsInstanceOf ( oControl , #singleLineEdit ) PostMessage ( oControl:Handle() , EM_setsel , 0 , 0L) ENDIF RETURN NIL regards Karl-Heinz