Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.clipper.visual-objects > #8666
| Path | csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail |
|---|---|
| From | "Urs Eggmann" <Urs.Eggmann@shinternet.ch> |
| Newsgroups | comp.lang.clipper.visual-objects |
| Subject | Re: Selection in MulitlineEdit |
| Date | Fri, 13 Nov 2015 13:19:28 +0100 |
| Lines | 83 |
| Message-ID | <dam3k0Fcbj1U1@mid.individual.net> (permalink) |
| References | <61e47ada-ce37-4c70-8360-c9fcc8d6519e@googlegroups.com> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; format=flowed; charset="iso-8859-1"; reply-type=original |
| Content-Transfer-Encoding | 7bit |
| X-Trace | individual.net WMRk6jyJtsQH1e4Al7V/TgVva/3EFJJemBEiFM8I8qS1o3IZbC |
| Cancel-Lock | sha1:1dlujiX2uv3kBhOTq5yhWzXJ6Iw= |
| X-Priority | 3 |
| X-MSMail-Priority | Normal |
| X-Newsreader | Microsoft Outlook Express 6.00.2900.5931 |
| X-MimeOLE | Produced By Microsoft MimeOLE V6.00.2900.6157 |
| X-EsetId | 37303A2992966F64627561 |
| X-EsetScannerBuild | 26702 |
| Xref | csiph.com comp.lang.clipper.visual-objects:8666 |
Show key headers only | View raw
Hi Lu,
Please check your mail...
regards
Urs
"Lu" <lu2k@hotmail.com> schrieb im Newsbeitrag
news:61e47ada-ce37-4c70-8360-c9fcc8d6519e@googlegroups.com...
Hi VO-Experts
There is a multiline-edit control with readonly and with doubleclick I can
change the content of the mle. When I make a doubleclick on the mle the
courser should stay in a new line and nothing should be selected.
At the first doubleclick the readonly flag is getting false and I can edit
the content, but there is always a selection of a word or more. There should
nothing be selected. At the second time I make a doubleclick the courser
jumps to a new line and everything works fine.
METHOD EventHandler(oEvent) CLASS Tab1
If oEvent:Message = WM_LBUTTONDBLCLK
If oEvent:Window = self:oDCmleTest
self:oDCmleTest:ReadOnly := false
self:oDCmleTEst:VALUE := self:oDCmleTEst:VALUE + _chr(10)
nLen := SLen(self:oDCmleTEst:VALUE)
self:oDCmleTEst:Selection := Selection{nLen,nLen}
PostMessage(self:oDCmleTEst:Handle(), EM_SCROLLCARET, nLen, nLen)
PostMessage(self:oDCmleTEst:Handle(), EM_SETSEL,nLen,nLen)
self:oDCmleTEst:PageDown()
ENDIF
ENDIF
I also tried an extra Dispatch Method for the mle or a new Setfocus()
Method, for no selection but at the first doubleclick it does not help. I
also tried it in the EditFocusChange Method
Method Dispatch(oEvent) class mleStandard1
IF oEvent:Message == WM_LBUTTONDBLCLK
IF GetFocus() == self:Handle()
PostMessage(self:Handle(), EM_SETSEL,0,0)
PostMessage(self:Handle(), EM_SCROLLCARET, 0, 0)
ENDIF
ENDIF
RETURN SUPER:Dispatch(oEvent)
Method SetFocus() class mleStandard1
self:Selection:=Selection{Len(self:VALUE),Len(self:VALUE)}
PostMessage(self:Handle(), EM_SCROLLCARET, 0, 0)
Return Nil
method EditFocusChange(oEditFocusChangeEvent) class Tab1
LOCAL dwLen1 as DWORD
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)
IF lGotFocus == true
IF oControl:NameSym == #mleTest
dwLen1 := SLen(self:oDCmleTEst:TEXTValue)
PostMessage(oEditFocusChangeEvent:Control:Handle(), EM_SETSEL, dwLen1,
dwLen1)
PostMessage(oEditFocusChangeEvent:Control:Handle(), EM_SCROLLCARET, 0, 0)
ENDIF
ENDIF
Thanks for any help in advance
Lu
Back to comp.lang.clipper.visual-objects | Previous | Next — Previous in thread | Find similar | Unroll thread
Selection in MulitlineEdit Lu <lu2k@hotmail.com> - 2015-11-09 07:01 -0800 Re: Selection in MulitlineEdit "Urs Eggmann" <Urs.Eggmann@shinternet.ch> - 2015-11-13 13:19 +0100
csiph-web