﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>StrataFrame Forum » StrataFrame Application Framework - V1 » WinForms (How do I?)  » Odd Textbox Behavior</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Mon, 14 Sep 2026 07:54:21 GMT</lastBuildDate><ttl>20</ttl><item><title>Odd Textbox Behavior</title><link>http://forum.strataframe.net/FindPost13601.aspx</link><description>The SF textbox control is exhibiting very odd behavior.&amp;nbsp; As soon as a user taps the space bar the cursor is sent to the beginning of the textbox.&amp;nbsp; The same behavior seems to be happening when the decimal point is used, too.&lt;/P&gt;&lt;P&gt;I am forced to replace all SF textboxes with DX textedit controls.&amp;nbsp; I hope this solves the problem.&lt;/P&gt;&lt;P&gt;Any idea what might have happened on those controls?&lt;/P&gt;&lt;P&gt;Bill</description><pubDate>Mon, 21 Jan 2008 17:24:04 GMT</pubDate><dc:creator>Bill Cunnien</dc:creator></item><item><title>RE: Odd Textbox Behavior</title><link>http://forum.strataframe.net/FindPost13612.aspx</link><description>That makes sense.&amp;nbsp; I do have some trim() stuff on some of those fields (not the numeric ones where the decimal point does the same thing).&amp;nbsp; I'll look into that a little more.&amp;nbsp; I wonder why the DevEx textedit control works and not the SF textbox.&amp;nbsp; Ahh, the mysteries of life.</description><pubDate>Mon, 21 Jan 2008 17:24:04 GMT</pubDate><dc:creator>Bill Cunnien</dc:creator></item><item><title>RE: Odd Textbox Behavior</title><link>http://forum.strataframe.net/FindPost13607.aspx</link><description>[quote]Any idea what might have happened on those controls?[/quote]&lt;P&gt;Do you have any Trim options set on the field properties?&amp;nbsp; This can cause this type of behavior when the field is evalutated.&amp;nbsp; You can get around this by either changing the property update to occur OnValidation instead of OnPropertyChanged...or create your own textbox and inherit the SF Textbox and add this code:&lt;/P&gt;&lt;P&gt;[codesnippet]&lt;BR&gt;Private _PreviousText As String = String.Empty&lt;BR&gt;&lt;/P&gt;&lt;P&gt;&lt;BR&gt;''' &amp;lt;summary&amp;gt;&lt;BR&gt;''' Overrides the OnTextChanged() method of the base class to prevent the firing&lt;BR&gt;''' of the TextChanged event when a trimmed string is entered.&lt;BR&gt;''' &amp;lt;/summary&amp;gt;&lt;BR&gt;''' &amp;lt;param name="e"&amp;gt;&amp;lt;/param&amp;gt;&lt;BR&gt;''' &amp;lt;remarks&amp;gt;&amp;lt;/remarks&amp;gt;&lt;BR&gt;Protected Overrides Sub OnTextChanged(ByVal e As System.EventArgs)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; '-- If the previous saved text value is not equal to the new text value&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; '&amp;nbsp;&amp;nbsp; then allow the event to fire, otherwise, don't fire the event&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; If Not Me._PreviousText.Trim().Equals(Me.Text.Trim()) Then&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MyBase.OnTextChanged(e)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; End If&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; '-- Update the previous text&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Me._PreviousText = Me.Text&lt;BR&gt;End Sub[/codesnippet]</description><pubDate>Mon, 21 Jan 2008 17:03:33 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item></channel></rss>