Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Custom Component Issue

Custom Component Issue

Scheduled Pinned Locked Moved C#
delphigraphicshelp
2 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    dbetting
    wrote on last edited by
    #1

    I have built a custom component that I use rather extensively but it has a "feature" that is not correct but I haven't been able to determine why. I converted one my Delphi components and merged it with features from several contributors here. I would like to thank all of you. The basis of the component is as follows: using System; using System.Collections; using System.Windows.Forms; using System.ComponentModel; using System.Text.RegularExpressions; namespace MyComponents {   public class myMaskedEdit : TextBox   {     public enum InputMaskType     { None, Dollars, Number, Integer, Percent, Phone, SSN, Zip, Custom }     public myMaskedEdit()     { ... }     ... Other Methods ...   } } I drag the component onto my UserControl and it looks something like: using System; using System.Collections; using System.ComponentModel; using System.Drawing; using System.Data; using System.Windows.Forms; namespace PARTS {   public class ucRMAHeader : System.Windows.Forms.UserControl   {     public ucRMAHeader()     {       InitializeComponent();       SetupForm();     }     ... Other Methods ...        #region Component Designer generated code     private void InitializeComponent()     {      ...       this.myMaskedEdit1.ErrorInvalid = false;       this.myMaskedEdit1.FormatText = true;       this.myMaskedEdit1.Location = new System.Drawing.Point(8, 48);       this.myMaskedEdit1.MaxLength = 0;       this.myMaskedEdit1.Name = "myMaskedEdit1";       this.myMaskedEdit1.Size = new System.Drawing.Size(108, 20);       this.myMaskedEdit1.StdInputMask = MyComponents.myMaskedEdit.InputMaskType.Integer;       this.myMaskedEdit1.TabIndex = 214;      ...     }     #endregion   } } I can set all the properties correctly and the program will compile and run as intended. The above code is how it is seen in the program. I then close the window for maintaining the form. I reopen it and the StdInpu

    D 1 Reply Last reply
    0
    • D dbetting

      I have built a custom component that I use rather extensively but it has a "feature" that is not correct but I haven't been able to determine why. I converted one my Delphi components and merged it with features from several contributors here. I would like to thank all of you. The basis of the component is as follows: using System; using System.Collections; using System.Windows.Forms; using System.ComponentModel; using System.Text.RegularExpressions; namespace MyComponents {   public class myMaskedEdit : TextBox   {     public enum InputMaskType     { None, Dollars, Number, Integer, Percent, Phone, SSN, Zip, Custom }     public myMaskedEdit()     { ... }     ... Other Methods ...   } } I drag the component onto my UserControl and it looks something like: using System; using System.Collections; using System.ComponentModel; using System.Drawing; using System.Data; using System.Windows.Forms; namespace PARTS {   public class ucRMAHeader : System.Windows.Forms.UserControl   {     public ucRMAHeader()     {       InitializeComponent();       SetupForm();     }     ... Other Methods ...        #region Component Designer generated code     private void InitializeComponent()     {      ...       this.myMaskedEdit1.ErrorInvalid = false;       this.myMaskedEdit1.FormatText = true;       this.myMaskedEdit1.Location = new System.Drawing.Point(8, 48);       this.myMaskedEdit1.MaxLength = 0;       this.myMaskedEdit1.Name = "myMaskedEdit1";       this.myMaskedEdit1.Size = new System.Drawing.Size(108, 20);       this.myMaskedEdit1.StdInputMask = MyComponents.myMaskedEdit.InputMaskType.Integer;       this.myMaskedEdit1.TabIndex = 214;      ...     }     #endregion   } } I can set all the properties correctly and the program will compile and run as intended. The above code is how it is seen in the program. I then close the window for maintaining the form. I reopen it and the StdInpu

      D Offline
      D Offline
      dbetting
      wrote on last edited by
      #2

      I'm not sure why this question bothered someone to where they jest with their own version of it. I guess the bottom line is that my understanding of the properties is that they are stored in the Component Designer section of the code. If I open the window again to maintain it, the Component Designer code should've repopulated the property editor...but it doesn't. Whether it is my component or not, I wouldn't think it would matter. I don't believe my question is that far out of line.

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups