Results 1 to 4 of 4

Thread: is there an initialize event for inherited usercontrols?

  1. #1

    Thread Starter
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428

    is there an initialize event for inherited usercontrols?

    I'm inheriting a TextBox control, and I want it to have a default value for the Text property... I cant find an initialize event
    should I override the text property and set a default value for it then?
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

  2. #2
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    The closest thing is the constructor just set the text property there or in the OnParentChange event.

  3. #3

    Thread Starter
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428
    Originally posted by Edneeis
    The closest thing is the constructor just set the text property there or in the OnParentChange event.
    Umm why did I not think of the new constructor?

    thanks it worked, but what does the OnParentChanged event do? when is it fired
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

  4. #4
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    Controls have a parent property which links to the object they are seated on (i.e. a Form, Tab) and anytime this changes the event fires. Sometimes if you want the control to adjust to what its on this is a good event to use.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width