Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Inherited Form
Message
De
03/12/2007 16:20:34
 
 
À
02/12/2007 23:56:04
Information générale
Forum:
ASP.NET
Catégorie:
Formulaires
Titre:
Divers
Thread ID:
01251758
Message ID:
01272912
Vues:
14
OK, Michael ... a couple of things.

First, I didn't see anything that really relates to this in the link you have to vfpconversion.

But secondly, now I think I understand the confusion, because you just mentioned the "drop down menu" of the Property Sheet. No, your properties in your UserControl won't show up there. But, they will show up in the list of Properties for your UserControl.

So, you drop your HtmlHitlist user control on a Form (and call it MyHtmlHitList). You then go to the Property Sheet for your Form, go to the drop down list, find and choose MyHtmlHitList. Now, in the list of properties associated with MyHtmlHitList, you *should* see a property for FullViewBrowser.

Does that make sense now?

~~Bonnie




>TWWebBrowser is my subclassed WebBrowser in a spirit of Foxpro guidelines.
>I've just tried to add a label, and a property for label to my usercontrol
>
> public Label LLabel
> {
> get { return label1; }
> set { label1 = value; }
> }
>
>but it didn't make any difference , I can't see LLabel in drop down menu of properties on a form where I put a parent usercontrol with that label.
>
>Folks at
>
>http://www.vfpconversion.com/Article.aspx?quickid=050084
>
>seem to confirm my statement for public children ( they don't mention children wrapped as properties though ). Article related to VS2003 , I am in VS 2008 from Friday , but the same behaviour.
>It would be interesting to see the simple example how it works at solution level if you could expose it somehow , as usercontrol is very important building block , and it would be very handy to see elements of that in properties.
>
>>Strange. The Property *should* show up in your Property Sheet. I have plenty of controls sub-classed from UserControl, so I know it works. The only thing I can think of is that it might have something to do with the type of property being something called TWWebBrowser (I don't know what that is). Maybe a reference needs to be added? I don't know ... just guessing.
>>
>>~~Bonnie
>>
>>
>>
>>>Perhaps, I misunderstood your point. Assuming I've got user control with a split container and 2 browser controls in the panels.
>>>I created a property , though member fullViewBrowser is internal anyway.
>>>
>>>   public partial class HtmlHitlist : UserControl
>>>    {
>>>
>>>        public TWWebBrowser FullViewBrowser
>>>        {
>>>            get { return fullViewBrowser; }
>>>            set { fullViewBrowser = value; }
>>>        }
>>>
>>>I put control on a form tab page as htmlHitList1
>>>Am I supposed to see FullViewBrowser in Properties for that form ? Probably not, as I don't. For some reason in VS they decided to treat usercontrol as a black box in designer view. Surely either member or property are accessible in a code.
>>>
>>>
>>>        protected override void OnShown(EventArgs e)
>>>        {
>>>
>>>                base.OnShown(e);
>>>                this.htmlHitlist1.FullViewBrowser.DocumentText = "<html><hr><h2>Full view</h2><hr></html>";
>>>                this.htmlHitlist1.fullViewBrowser.DocumentText = "<html><hr><h2>Full view</h2><hr></html>";
>>>
>>>   ...
>>>
>>>
>>>
>>>>>Just curious , does similar limitation apply to usercontrol used as a container. Unlike Visual Foxpro when placed on a form, children are not editable via property sheet regardless of access modifier. No problem to deal with them programmatically.
>>>>
>>>>No, there is no such limitation with UserControls ... but to be able to edit them via the Property Sheet, you would need real properties (with get/set), rather than simply protected or public modifiers.
>>>>
>>>>~~Bonnie
>>>>
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform