Print Page | Close Window

How do I detect changed have been made

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Syntax Edit
Forum Description: Topics Related to Codejock Syntax Edit
URL: http://forum.codejock.com/forum_posts.asp?TID=14517
Printed Date: 27 April 2024 at 5:01pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: How do I detect changed have been made
Posted By: jads
Subject: How do I detect changed have been made
Date Posted: 12 June 2009 at 5:13am
Is there changes made property or change event or similar so that I can determine if the text in the control has been altered since loading. Useful when exiting the program so that the user can be asked if changes made are to be saved. The key press event isnt enough as not all keys change the text and other events can also change the text.

-------------
Product: Xtreme SuitePro (ActiveX) version 13.4.0
Platform: Windows XP (32bit) - SP 3
Language: Visual Basic 6.0 SP6



Replies:
Posted By: joeliner
Date Posted: 15 June 2009 at 8:04am
Hi jads,

maybe try the event CurPosChanged of the SyntaxEdit and the undobuffer.

Logic:
if the syntaxEdit.canUndo = True then changes have been made to the document

Limitation:
Not all changes are stored on the undo buffer esp if you use:

a) Insertrow to add text into specific row
b) Change the text in runtime by code: e.g syntaxedit.Text = "Text"

regards,



-------------
Product: Xtreme SuitePro (ActiveX) version 13.1
Platform: Windows XP SP 3
Language: Visual Basic 6 SP6


Posted By: jads
Date Posted: 16 June 2009 at 11:52pm
Thanks for that, It will help.

-------------
Product: Xtreme SuitePro (ActiveX) version 13.4.0
Platform: Windows XP (32bit) - SP 3
Language: Visual Basic 6.0 SP6


Posted By: joeliner
Date Posted: 17 June 2009 at 7:46am
Hey jads,

with 13.1 comes the TextChanged event that might work better for you!

regards,



-------------
Product: Xtreme SuitePro (ActiveX) version 13.1
Platform: Windows XP SP 3
Language: Visual Basic 6 SP6


Posted By: jads
Date Posted: 17 June 2009 at 7:34pm
That looks like it will do the job, thanks

-------------
Product: Xtreme SuitePro (ActiveX) version 13.4.0
Platform: Windows XP (32bit) - SP 3
Language: Visual Basic 6.0 SP6



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net