Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
360
Setting control height at design time.
posted

I have extended a ultratextbox and I like to set the control hieght to a specific height (21) when the control is created in design mode.  I found an article on msdn  to how to perform custom initialization for controls in design mode by overriding the InitializeNewComponent method.  Is there a way to do this with the infragistics controls?

 

John

Parents
  • 37774
    posted

    If I remember correctly, InitializeNewComponent is on the designer class itself and not the control.  If you only ever want this to be applicable when the control is created at design-time, then I think you'd have to create your own class that derives from the UltraTextEditor's designer (UltraTextEditorDesigner) and override the InitializeNewComponent.  Then you'd have to add the Designer attribute to a new derived class that you would need to create for the control itself.

    If you want this to be applicable to any controls created at run-time too (or just don't care because you're not creating anything at run-time), I would think that the much simpler approach would be to override the DefaultSize property on the control.

    -Matt

Reply Children