| View previous topic :: View next topic |
| Author |
Message |
trapper Contributor


Joined: 28 Jan 2005 Posts: 112 Location: Brisbane, Australia
|
Posted: Thu Apr 07, 2005 1:04 am Post subject: Edit box event when contents change? |
|
|
Is it possible to generate an event when the contents of an Edit box change, or when something is first typed into it, ie. an initial character?
I know the Edit box has an Exit event, but that is too late for what I want to do.
Regards. _________________ John Trappett |
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Thu Apr 07, 2005 1:43 am Post subject: |
|
|
If the edit box is small, you can record it's contents and check for changes in a timer loop. If it's larger (such as an editor) you can check the modified status with sendmsg (also in a timer loop):
| Code: |
rem -- Check if document has been modified --
if @zero(@sendmsg(@winexists(~Edit1),$0B8,0,0))
%m = ""
else
%m = Modified
end
|
If anyone's interested, here's some code for a VDS text editor:
http://www.vdsworld.com/forum/viewtopic.php?p=545
Cheers, Mac  _________________ VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361

Last edited by Mac on Thu Apr 07, 2005 1:47 am; edited 1 time in total |
|
| Back to top |
|
 |
trapper Contributor


Joined: 28 Jan 2005 Posts: 112 Location: Brisbane, Australia
|
Posted: Thu Apr 07, 2005 1:46 am Post subject: |
|
|
Thanks for the speedy reply Mac.
Cheers.  _________________ John Trappett |
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Thu Apr 07, 2005 2:02 am Post subject: |
|
|
No problemo, hope the info was useful.
Cheers, Mac  _________________ VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
 |
|
| Back to top |
|
 |
|