Northwoods.Go Assembly > Northwoods.Go Namespace > GoText Class : DoBeginEdit Method |
This is responsible for calling GoView.StartTransaction. (DoEndEdit is responsible for finishing the transaction.) This basically sets both Editor and GoView.GoView.EditControl to the result from calling CreateEditor. However, this method does nothing if an edit is already in progress, when Editor is not null.
If you override this method, you can perform some customization of the resulting Control
for the given GoView by first calling the base method and then looking at the Control
, as follows: public override void DoBeginEdit(GoView view) { base.DoBeginEdit(view); if (this.Editor == null) return; // failed to create editor // get the Control for the Editor created in base method for this GoText System.Windows.Forms.Control ctrl = this.Editor.GetControl(view); if (ctrl != null) { ... simple Control customization ... } }
However, many Control
s require more sophisticated behavior, which is best implemented by inheriting from that particular Control
class, implementing IGoControlObject, and handling the desired events. Normally that is done by overriding CreateEditor instead of overriding this method.
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2