Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.clipper.visual-objects > #4932 > unrolled thread
| Started by | office.sonita@gmail.com |
|---|---|
| First post | 2013-03-21 00:35 -0700 |
| Last post | 2013-03-23 01:36 -0700 |
| Articles | 5 — 2 participants |
Back to article view | Back to comp.lang.clipper.visual-objects
Visual Objects 2.8 (2830) Edit Control with an active PICTURE clause office.sonita@gmail.com - 2013-03-21 00:35 -0700
Re: Visual Objects 2.8 (2830) Edit Control with an active PICTURE clause "Willie Moore" <williem@wmconsulting.com> - 2013-03-21 07:41 -0500
Re: Visual Objects 2.8 (2830) Edit Control with an active PICTURE clause office.sonita@gmail.com - 2013-03-22 10:45 -0700
Re: Visual Objects 2.8 (2830) Edit Control with an active PICTURE clause "Willie Moore" <williem@wmconsulting.com> - 2013-03-22 13:26 -0500
Re: Visual Objects 2.8 (2830) Edit Control with an active PICTURE clause office.sonita@gmail.com - 2013-03-23 01:36 -0700
| From | office.sonita@gmail.com |
|---|---|
| Date | 2013-03-21 00:35 -0700 |
| Subject | Visual Objects 2.8 (2830) Edit Control with an active PICTURE clause |
| Message-ID | <c05de7d0-540c-4250-944c-0a0f07144f75@googlegroups.com> |
When I edit the field for the first time in the form, and the field has PICTURE clause, the content of the field deletes. How to avoid this behavior ? Thank you in advance Regards, Veselin
[toc] | [next] | [standalone]
| From | "Willie Moore" <williem@wmconsulting.com> |
|---|---|
| Date | 2013-03-21 07:41 -0500 |
| Message-ID | <kiev5o$dhl$1@speranza.aioe.org> |
| In reply to | #4932 |
Veselin,
If you want the SLE to start in a different position (ie not to erase
whatever might be in there already), use a postmessage in your windows's
postinit or you can subclass the SLE and make a change in the focuschange
message.
Regards,
Willie
Vulcan VIP
Class mySLE Inherit SingleLineEdit
METHOD FocusChange(oFocusChangeEvent) CLASS mySLE
LOCAL iPos AS LONGINT // modified focuschange from the SDK
LOCAL uRet AS USUAL
uRet := SUPER:FocusChange(oFocusChangeEvent)
IF oFocusChangeEvent:GotFocus
iPos := 0
PostMessage(SELF:Handle(), EM_SETSEL, DWORD(iPos), iPos) // set
cursor to the him position
endif
return uRet
wrote in message
news:c05de7d0-540c-4250-944c-0a0f07144f75@googlegroups.com...
When I edit the field for the first time in the form, and the field has
PICTURE clause, the content of the field deletes. How to avoid this behavior
?
Thank you in advance
Regards,
Veselin
[toc] | [prev] | [next] | [standalone]
| From | office.sonita@gmail.com |
|---|---|
| Date | 2013-03-22 10:45 -0700 |
| Message-ID | <8ccba769-ed95-4a2f-8270-0b36377e0e71@googlegroups.com> |
| In reply to | #4932 |
Willie,
Thanks for the reply.
I mean the following - in the window PostInit oDCIban:CurrentText := '12345678'.
Focus oDCIban and move the cursor to the left or to the rigth by left right key and then type any symbol. The content of the field deletes.
This behavior occurs in to my classes :
CLASS CustomerSleDate INHERIT SingleLineEdit
METHOD Init(oOwner,nID,oPoint,oDimension,kStyle) CLASS CustomerSleDate
SUPER:Init(oOwner,nID,oPoint,oDimension,kStyle)
SELF:FieldSpec := DateFS{}
RETU SELF
CLASS CustomerSleIban INHERIT SingleLineEdit
METHOD Init(oOwner,nID,oPoint,oDimension,kStyle) CLASS CustomerSleIban
SUPER:Init(oOwner,nID,oPoint,oDimension,kStyle)
SELF:FieldSpec := FS_SleIban{}
SELF:SetStyle(ES_UPPERCASE)
RETU SELF
CLASS FS_SleIban INHERIT StringFS
METHOD Init() CLASS FS_SleIban
SUPER:Init(HyperLabel{'FS_Iban','FS_Iban','','FS_Iban'},50)
SELF:Picture:='NNNN NNNN NNNN NNNN NNNN NNNN NNNN NNNN'
If I remove SELF:FieldSpec := FS_SleIban{} all is OK.
Thank you
Regards,
Veselin
[toc] | [prev] | [next] | [standalone]
| From | "Willie Moore" <williem@wmconsulting.com> |
|---|---|
| Date | 2013-03-22 13:26 -0500 |
| Message-ID | <kii7o9$lcc$1@speranza.aioe.org> |
| In reply to | #4955 |
Veselin,
Thanks for your sample. I have been able to replicate the issue and here is
what you need to do. Change oDCIban:CurrentText := '12345678' to
oDCIban:Value := '12345678' and it will work. CurrentText only sets the
buffer in the SLE. It does not change the editobject. When you use Value, it
changes the underlying editobject which formats the value into your picture
clause.
Regards,
Willie
Vulcan VIP
wrote in message
news:8ccba769-ed95-4a2f-8270-0b36377e0e71@googlegroups.com...
Willie,
Thanks for the reply.
I mean the following - in the window PostInit oDCIban:CurrentText :=
'12345678'.
Focus oDCIban and move the cursor to the left or to the rigth by left right
key and then type any symbol. The content of the field deletes.
This behavior occurs in to my classes :
CLASS CustomerSleDate INHERIT SingleLineEdit
METHOD Init(oOwner,nID,oPoint,oDimension,kStyle) CLASS CustomerSleDate
SUPER:Init(oOwner,nID,oPoint,oDimension,kStyle)
SELF:FieldSpec := DateFS{}
RETU SELF
CLASS CustomerSleIban INHERIT SingleLineEdit
METHOD Init(oOwner,nID,oPoint,oDimension,kStyle) CLASS CustomerSleIban
SUPER:Init(oOwner,nID,oPoint,oDimension,kStyle)
SELF:FieldSpec := FS_SleIban{}
SELF:SetStyle(ES_UPPERCASE)
RETU SELF
CLASS FS_SleIban INHERIT StringFS
METHOD Init() CLASS FS_SleIban
SUPER:Init(HyperLabel{'FS_Iban','FS_Iban','','FS_Iban'},50)
SELF:Picture:='NNNN NNNN NNNN NNNN NNNN NNNN NNNN NNNN'
If I remove SELF:FieldSpec := FS_SleIban{} all is OK.
Thank you
Regards,
Veselin
[toc] | [prev] | [next] | [standalone]
| From | office.sonita@gmail.com |
|---|---|
| Date | 2013-03-23 01:36 -0700 |
| Message-ID | <da87e0fd-18d1-46cf-9653-bb447eda385b@googlegroups.com> |
| In reply to | #4932 |
Willie, Thanks for your advice. I changed ASSIGN CurrentText of my SLE class and it works. ASSIGN CurrentText(uValue) CLASS CustomerSleIban SUPER:CurrentText := uValue SELF:Value := uValue RETU NIL Regards, Veselin
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.clipper.visual-objects
csiph-web