StrataFrame Forum
Back
Login
Login
Home
»
StrataFrame Application Framework - V1
»
WinForms (How do I?)
»
Run time error on DevEx Subclasses TextBox
Run time error on DevEx Subclasses TextBox
Post Reply
Like
0
Run time error on DevEx Subclasses TextBox
View
Flat Ascending
Flat Descending
Threaded
Options
Subscribe to topic
Print This Topic
RSS Feed
Goto Topics Forum
Author
Message
Ger Cannoll
Ger Cannoll
posted 13 Years Ago
ANSWER
Topic Details
Share Topic
Group: StrataFrame Users
Posts: 430,
Visits: 507
I just upgraded the DevEx Comntrols to 11.1 and since then I am getting a run time error on a Devex Subclassed Control
(Everything was working fine prior to the upgrade)
I have traced the Error (Object reference not set to an instance....) back to a Line on the .Designer.cs file :
((System.ComponentModel.
ISupportInitialize
)(
this
.txtTotalExposure.Properties)).BeginInit();
My Subclassed Code is (Which I have not changed)
// 31-03-11 Subclass form DevExpress Controls
public class dxTextEdit : MicroFour.StrataFrame.UI.Windows.Forms.DevEx.TextEdit
{
private System.Drawing.Color originalBackgroudColour;
protected override void OnEnter(EventArgs e)
{
//-- Run Base Class Code
// XtraMessageBox.Show("this is a message in OnEnter of dcTextEdit");
base.OnEnter(e);
//-- Save away original background color
this.originalBackgroudColour = this.BackColor;
// Mimic the VFP SelectOnEntry = .t.
this.SelectAll();
//-- Set fields to be the maximum length of the database fields
//-- For Memo (VarChar(Max) check for Mutiline..assumes Multiline is on for VarChar(Max) though
// -----> TextEdit does not seem to have a propety called MultiLine or AutoAdjustMaxLength..GOC Modified SF code No MUltiLine though ??
if (this.BusinessObject == null )
{
this.AutoAdjustMaxLength = false;
}
else
{
// XtraMessageBox.Show("dxTextEdit... before setting this.AutoAdjustMaxLength to true");
this.AutoAdjustMaxLength = true;
}
//-- Define the background color for the control.. maybe extend this to use a property later
this.BackColor = Color.Aqua;
}
protected override void OnLeave(EventArgs e)
{
//-- Run the Base Code for the textbox
base.OnLeave(e);
//-- Reset back color to the default
this.BackColor = this.originalBackgroudColour;
}
} // End dxTextEdit
// 31-03-11 SubClas dxTextEdit for 0 decimal point numeric field
public class dxTextEdit0D : dxTextEdit
{
protected override void OnEnter(EventArgs e)
{
base.OnEnter(e);
this.Properties.DisplayFormat.FormatType = DevExpress.Utils.FormatType.Numeric;
this.Properties.EditFormat.FormatType = DevExpress.Utils.FormatType.Numeric;
this.Properties.EditFormat.FormatString = "###,###,###,##0"; // Allow dec point else it ignores it and 12.34 goes to 1234
this.Properties.DisplayFormat.FormatString = "###,###,###,##0";
this.Properties.Mask.MaskType = DevExpress.XtraEditors.Mask.MaskType.Numeric;
this.Properties.Mask.EditMask = "n00";
}
} // End dxTextEditN0
Reply
Like
0
GO
Merge Selected
Merge into selected topic...
Merge into merge target...
Merge into a specific topic ID...
Open Merge
Threaded View
Threaded View
Run time error on DevEx Subclasses TextBox
Ger Cannoll
-
13 Years Ago
OK . Seem to have got this sorted. Even though I 'thought' I had...
Ger Cannoll
-
13 Years Ago
Hi Gerard, Yeap, I've seen errors like that before when rebuilding SF...
Edhy Rijo
-
13 Years Ago
I checked while updating SF source and closed all the projects that...
Zoltan Riss
-
13 Years Ago
Hi Zoltan. Are you getting a run time error in relation to new...
Ger Cannoll
-
13 Years Ago
Post Reply
Like
0
Similar Topics
Post Quoted Reply
Reading This Topic
Login
Login
Remember Me
Reset Password
Resend Validation Email
Login
Explore
Messages
Mentions
Search