Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.clipper.visual-objects > #10290

Re: Cursor position in a short SingleLineEdit

From "Karl-Heinz" <invalid@invalid.invalid>
Newsgroups comp.lang.clipper.visual-objects
Subject Re: Cursor position in a short SingleLineEdit
Date 2017-03-15 08:01 +0100
Message-ID <eis76qFp8o2U2@mid.individual.net> (permalink)
References <91b5b94f-c406-4699-be07-8ee2988a7e0a@googlegroups.com>

Show all headers | View raw


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 

Back to comp.lang.clipper.visual-objects | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Cursor position in a short SingleLineEdit zodcomag@gmail.com - 2017-03-13 05:49 -0700
  Re: Cursor position in a short SingleLineEdit Franz Rachbauer <office@rachbauer.org> - 2017-03-13 18:44 +0100
  Re: Cursor position in a short SingleLineEdit "Jamal" <noooospam@example.com> - 2017-03-13 13:50 -0400
  Re: Cursor position in a short SingleLineEdit zodcomag@gmail.com - 2017-03-14 11:44 -0700
  Re: Cursor position in a short SingleLineEdit "Karl-Heinz" <invalid@invalid.invalid> - 2017-03-15 08:01 +0100
  Re: Cursor position in a short SingleLineEdit zodcomag@gmail.com - 2017-03-15 03:51 -0700

csiph-web