Sorry, jetzt hab ichs verstanden, das rechte Bild ist immer am start :)

-----Ursprüngliche Nachricht-----
Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im
Auftrag von [EMAIL PROTECTED]
Gesendet: Donnerstag, 6. Januar 2005 12:45
An: asp.net@glengamoi.com
Betreff: RE: AW: [Asp.net] Einfaches Custom Control Problem?

Ich hab mich vermutlich unklar ausgedrückt. Aber jetzt hast du in deinem
Beispiel einfach das eine Bild entfernt. Letztendlich soll es im Custom
Control
ein Bild, welches abhängig vom Attribut Expanded ist und ein Bild, welches
irgend ein anderes Bild anzeigt, haben:

----------------------------------------------
Bild Expanded od Collapsed ¦  Irgendeinbild  ¦
----------------------------------------------


>-- Original-Nachricht --
>From: "Andreas Rudischhauser" <[EMAIL PROTECTED]>
>To: <asp.net@glengamoi.com>
>Subject: AW: [Asp.net] Einfaches Custom Control Problem?
>Reply-To: asp.net@glengamoi.com
>Date: Thu, 6 Jan 2005 12:26:21 +0100
>
>
>Es geht sogar noch cooler wenn du von Image ableitest:
>
>       using System;
>       using System.Web.UI;
>       using System.Web.UI.WebControls;
>       using System.ComponentModel;
>
>       namespace test
>       {
>               /// <summary>
>               /// Summary description for WebCustomControl1.
>               /// </summary>
>               [DefaultProperty("Text"), 
>               ToolboxData("<{0}:MyButton runat=server></{0}:MyButton>")]
>               public class MyButton : Image
>               {
>                       
>                       //Hier sperre ich das Setzten der ImageUrl
>                       public override string ImageUrl
>                       {
>                               get
>                               {
>                                       return base.ImageUrl;
>                               }
>                       }
>
>                       
>       
>                       [Bindable(true), 
>                       Category("Appearance"), 
>                       DefaultValue(true)] 
>                       public bool Expanded
>                       {
>                               get
>                               {
>                                       return this.expanded;
>                               }
>
>                               set
>                               {
>                                       this.expanded = value;
>                               }
>                       }
>                       private bool expanded = true;
>                       
>                       [Bindable(true), 
>                       Category("Appearance"), 
>                       DefaultValue("")] 
>                       public string ImageUrlExpanded 
>                       {
>                               get
>                               {
>                                       return this.imageUrlExpanded;
>                               }
>                               set
>                               {
>                                       this.imageUrlExpanded = value;
>                               }
>                       }
>                       private string imageUrlExpanded = "";
>
>                       [Bindable(true), 
>                       Category("Appearance"), 
>                       DefaultValue("")] 
>                       public string ImageUrlCollapsed 
>                       {
>                               get
>                               {
>                                       return this.imageUrlCollapsed;
>                               }
>
>                               set
>                               {
>                                       this.imageUrlCollapsed = value;
>                               }
>                       }
>                       private string imageUrlCollapsed = "";
>
>                       protected override void OnLoad(EventArgs e)
>                       {
>                               base.OnLoad (e);
>                               base.ImageUrl = (this.expanded) ?
>this.imageUrlExpanded : this.imageUrlCollapsed;
>                       }
>               }
>       }
>
>
>_______________________________________________
>Asp.net Mailingliste, Postings senden an:
>Asp.net@glengamoi.com
>An-/Abmeldung und Suchfunktion unter:
>http://www.glengamoi.com/mailman/listinfo/asp.net

_______________________________________________
Asp.net Mailingliste, Postings senden an:
Asp.net@glengamoi.com
An-/Abmeldung und Suchfunktion unter:
http://www.glengamoi.com/mailman/listinfo/asp.net

_______________________________________________
Asp.net Mailingliste, Postings senden an:
Asp.net@glengamoi.com
An-/Abmeldung und Suchfunktion unter:
http://www.glengamoi.com/mailman/listinfo/asp.net

Antwort per Email an