﻿<?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?)  » Extending the TextEdit Control</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Tue, 09 Jun 2026 10:26:38 GMT</lastBuildDate><ttl>20</ttl><item><title>Extending the TextEdit Control</title><link>http://forum.strataframe.net/FindPost22911.aspx</link><description>I have successfully extended the DevEx TextEdit control for use in my application.  It is actually the control that is already extended by SF.  When I drop it on a form that already has a primary BO assigned, the BusinessObject property is not set to that BO.  The non-extended version of the control will fill this property in properly.  How do I add that functionality to my extended control?&lt;br&gt;
&lt;br&gt;
Thanks!&lt;br&gt;
Bill</description><pubDate>Wed, 29 Apr 2009 09:55:05 GMT</pubDate><dc:creator>Bill Cunnien</dc:creator></item><item><title>RE: Extending the TextEdit Control</title><link>http://forum.strataframe.net/FindPost22944.aspx</link><description>It should already have it implemented, so you may need to override the BusinessObject property to add additional logic to do this.&amp;nbsp; No problems on the questions, this is how you really learn what goes on under the hood.</description><pubDate>Wed, 29 Apr 2009 09:55:05 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Extending the TextEdit Control</title><link>http://forum.strataframe.net/FindPost22942.aspx</link><description>So, if I inherit from MicroFour.StrataFrame.UI.Windows.Forms.DevEx.TextEdit do I need to implement IBusinessBindable and IInitializeBusinessObject interfaces in my own extended control?&lt;br&gt;
&lt;br&gt;
This is the first control that I have extended.  Sorry for my greenhorn questions.&lt;br&gt;
Bill</description><pubDate>Wed, 29 Apr 2009 09:52:40 GMT</pubDate><dc:creator>Bill Cunnien</dc:creator></item><item><title>RE: Extending the TextEdit Control</title><link>http://forum.strataframe.net/FindPost22937.aspx</link><description>You can look at the SF source code to see how this is done on the BusinessObject property.&amp;nbsp; Below is the code:&lt;/P&gt;&lt;P&gt;[codesnippet]''' &amp;lt;summary&amp;gt;&lt;BR&gt;''' The business object that is used to bind the data to this field&lt;BR&gt;''' &amp;lt;/summary&amp;gt;&lt;BR&gt;''' &amp;lt;value&amp;gt;&amp;lt;/value&amp;gt;&lt;BR&gt;''' &amp;lt;remarks&amp;gt;&amp;lt;/remarks&amp;gt;&lt;BR&gt;&amp;lt;Category(EDITOR_CATEGORY), _&lt;BR&gt;DefaultValue(CType(Nothing, Object)), _&lt;BR&gt;Description(EDITOR_BUSINESSOBJECT_DESC)&amp;gt; _&lt;BR&gt;Public Property BusinessObject() As BusinessLayerBase Implements IBusinessBindable.BusinessObject&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Get&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; '-- Set the business object to the forms primary business object&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If Not _BusinessObjectEvaluated Then&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _BusinessObjectEvaluated = True&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Try&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; BusinessBasics.DefaultBusinessObjectToFormPrimary(Me.DesignMode, _BusinessObject, CType(Me.GetService(GetType(System.ComponentModel.Design.IDesignerHost)), System.ComponentModel.Design.IDesignerHost))&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Catch ex As Exception&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End Try&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End If&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Return _BusinessObject&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; End Get&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set(ByVal value As BusinessLayerBase)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; '-- If the business object is being removed, then make sure it is no longer bound&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If (value Is Nothing) AndAlso (_BusinessObject IsNot Nothing) Then&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Me._BusinessObject.RemoveFromListOfBoundControls(Me)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End If&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If (Not Me.DesignMode) AndAlso (value IsNot Nothing) Then&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; value.AddToListOfBoundControls(Me)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End If&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _BusinessObject = CType(value, BusinessLayer)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; End Set&lt;BR&gt;End Property[/codesnippet]</description><pubDate>Wed, 29 Apr 2009 09:36:05 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item></channel></rss>