My apologies
The interactive change event is indeed related to a EDIT/memo event
and it should then display the number of characters
The ENTER key is a reference to start a NEW LINE
I have this working elsewhere without any issues, but in that instance, I
do not ever want to start a new line because it relates to a SMS/Txt
message.
>
> I'm having a problem with editing a memo file
>>
>> My code says
>> trcask603=LEN(ALLTRIM(this.**value))
>> thisform.label9.Caption="**Description of project
>> ("+ALLTRIM(STR(trcask603))+" size)"
>> lines)"
>> thisform.label9.Refresh
>>
>> For some reason, this then does not allow me to press the ENTER key
>> The cursor stays in the same position instead of dropping down a line
Okay. Based on what you're saying, you're doing something like the code below.
(I realize you can get some kind of display by opening a table that
contains a memo field and then issuing EDIT commands, but the resulting
display does not have an InteractiveChange() event method as far as I can
tell, so I assume you are using an actual EDITBOX control on a form.)
The code below contains the actual line of code from your original message.
As you can see, it contains a syntax error. I've substituted a similar line
of code that works.
Typing in the editbox updates the label with the number of characters and
your label text, as your code indicated. Pressing the ENTER key in this
display goes to a new line with no error.
Is this what you're trying to do? If not, can you modify my code to show
what you are trying to do?
Ken Dibble
** Demo Code **
oForm = CREATEOBJECT("Form")
oForm.AddObject("label9","Label")
WITH oForm.label9
.Top = 10
.Left = 5
.Width = 200
.Height = 20
.Visible = .T.
ENDWITH
oForm.AddObject("MemoBox1","MemoBox")
WITH oForm.MemoBox1
.Top = 40
.Left = 5
.Height = 80
.Width = 200
.Visible = .T.
ENDWITH
oForm.Show(1)
DEFINE CLASS MemoBox AS EditBox
PROCEDURE InteractiveChange
trcask603=LEN(ALLTRIM(this.value))
* Your original code below; it throws a Syntax error because
* you have an uneven number of double quotes and/or a missing
* plus (+) sign.
*thisform.label9.Caption="Description of project
("+ALLTRIM(STR(trcask603))+" size)" lines)"
* My similar code, below, works.
thisform.label9.Caption="Description of project
("+ALLTRIM(STR(trcask603))+" size lines)"
thisform.label9.Refresh
ENDPROC
ENDDEFINE
** End of Code**
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message:
http://leafe.com/archives/byMID/profox/[email protected]
** All postings, unless explicitly stated otherwise, are the opinions of the
author, and do not constitute legal or medical advice. This statement is added
to the messages for those lawyers who are too stupid to see the obvious.