Results 1 to 4 of 4

Thread: Custom Rollover Image Control

  1. #1

    Thread Starter
    Frenzied Member Memnoch1207's Avatar
    Join Date
    Feb 2002
    Location
    DUH, Guess...Hint: It's really hot!
    Posts
    1,861

    Custom Rollover Image Control

    I'm creating a custom rollover image control, which inherits from WebControl. Everything works great except when I initially drop the control on the page and set the BaseImage property, it doesn't fill in the imagebox with the image I have specified.

    If you drop a .NET Image control on a page, initially the image doesn't appear, until you set the ImageUrl property, then the image appears.

    How can I refresh the control in the IDE to show the image that was set? Basically, duplicate the functionality of having the image appear when the property is set.
    Being educated does not make you intelligent.

    Need a weekend getaway??? Come Visit

  2. #2

    Thread Starter
    Frenzied Member Memnoch1207's Avatar
    Join Date
    Feb 2002
    Location
    DUH, Guess...Hint: It's really hot!
    Posts
    1,861
    hmmm....okay...
    Does anyone know how to refresh or repaint or rerender a control in the IDE after a property has changed?

    I have seen for windows forms that you can call the Invalidate method within the property to have it repaint the control, but that method doesn't exist in ASP.NET.
    Being educated does not make you intelligent.

    Need a weekend getaway??? Come Visit

  3. #3
    Frenzied Member Magiaus's Avatar
    Join Date
    Mar 2002
    Location
    swamp land
    Posts
    1,267

    Do you know about designers?

    If so look at the ControlDesigner's RaiseComponentChanged and RaiseComponentChanging members. Also, check out GetDesignTimeHtml, GetErrorDesignTimeHtml, and GetEmptyDesignTimeHtml.

    I don't have a good working example to post. Sorry.
    Magiaus

    If I helped give me some points.

  4. #4
    Frenzied Member Magiaus's Avatar
    Join Date
    Mar 2002
    Location
    swamp land
    Posts
    1,267

    Cool Oh!

    Be sure to use some sort of javescript image cache or you'll get a nasty lag effect. I have an ImageList for ASP.Net but I haven't finished the designer yet. It's nice I have an interface that add ImageList To a WebControl and the list is basicly a strong typed collection. It renders a javascript image array i.e. imgs[x] - new Image('path'); the Collection just maps the exact same index and .... blah..blah.. not done...
    Magiaus

    If I helped give me some points.

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