Issue With RichText Control in old version of CSLA

Issue With RichText Control in old version of CSLA

Old forum URL: forums.lhotka.net/forums/t/9909.aspx


phowatt posted on Friday, December 31, 2010

I am using CSLA 2.1.4 in an application developed in VB 2005 using VS 2005.  I am working with a form that has a RichTextBox control and am trying to build logic to support the various formating functions supported by the RichTextBox control.  I am using two TrackBars for the Indent and Hanging Indent features of the RichTextBox control.  The data from the control is bound to a business object the inherits the CSLA BusinessBase(Of T) base class.  When I have text in the control and use TrackBar1 by sliding it to the right it causes the update of the SelectionIndent property of the RichTextBox control to be altered and the text is coorespondingly indented.  The hanging indent works the same way via TrackBar2.  However,  if I first select some text in the control and alter the font of a portion of the text the font is correspondingly altered.  But now when I select TrackBar1 to alter the indentation it causes the BeginEdit method to activate and the copystate process goes into an endless loop causing a stack overflow.  I have not attempted to debug CSLA but what I would like to know is if there is a workaround for this problem.  Is there some way to prevent the BeginEdit from activating temporarily?  Or is there an option to not bind this particular object property to the RichTextBox control to prevent this issue?  I am not sure which control is using the BeginEdit interface, the RichTextBox or the TrackBar.  Any ideas?  Perhaps I cannot us a CSLA type class to accomplish this RichTextBox functionality.

NEVER MIND.  I found a circular reference in my Code.

Copyright (c) Marimer LLC