HtmlEditor :  Phorum 5 The fastest message board... ever.

This is the discussion forum for the HtmlEditor. See also the HtmlEditor home page, where you can download the control, and the Documentation Wiki, a collaborative project for documenting the control.

Goto Thread: PreviousNext
Goto: Forum ListMessage ListNew TopicSearchLog In
Great control, just one question
Posted by: Steven Wood (---.cableinet.co.uk)
Date: Thursday, 14-Nov-2002, 19:09:52

Hello Tim,

Works great, just the kind of thing I was looking for.

Just one question, please bear with me Iím pretty new to .NET. Why is the HtmlEditor class derived from Panel and not Control?

Cheers,

Steven Wood
[www.stevenwood.org]

Re: Great control, just one question
Posted by: Tim Anderson (---.server.ntl.com)
Date: Thursday, 14-Nov-2002, 22:09:30

Re. Control vs Panel, I don't think it would make a lot of difference. Panel inherits from Control. The Panel class adds some handy properties such as a BorderStyle, and it also inherits from ScrollableControl which could be useful.

Tim

Re: Great control, just one question
Posted by: Steven Wood (---.cableinet.co.uk)
Date: Friday, 15-Nov-2002, 11:20:59

Just my take on why you should use Control as the base class...

* As I see it the panel control is used to store multiple controls under one grouping not just one. Although I can see in some cases you may want to do this.
* The HTMLDocument class already supports scrollbars.
* It would make the control more flexible. If I want to place the control in a panel to get a BorderStyle then I can do that from the designer or in code. Gives the developer more options.
* In my own code I have had problems placing the HTMLEditor control within a panel with other controls. I could'nt get it to display, I had to recompile with the base class set to Control.

I don't think there are any drawbacks, that I can see, only advantages; it seems a better choice.

Ste

Re: Great control, just one question
Posted by: Tim Anderson (---.server.ntl.com)
Date: Friday, 15-Nov-2002, 11:42:43

Lutz Roeder's original demo of MSHTML hosting used Panel. I did at one time change it to Control, but for a reason I cannot recall, I changed it back. If it was just BorderStyle, then I take your point, and it ought to revert to Control.

Unless you or I find some snags, I'll go to Control in the next update.

Tim

Re: Great control, just one question
Posted by: Steven Wood (---.cableinet.co.uk)
Date: Friday, 15-Nov-2002, 12:39:13

Cool, I'll let you know if I run into any problems.

Re: Great control, just one question
Posted by: William Armstrong (---.in-addr.btopenworld.com)
Date: Thursday, 19-Dec-2002, 15:44:13

I put together a little sample control that shows you how to enable the borderstyle in your own controls, which some of you might find useful.

[www.crowsnest-design.com]



Your Name: 
Your Email: 
Subject: 
Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically.
vjJYp
This is a moderated forum. Your message will remain hidden until it has been approved by a moderator or administrator
This forum powered by Phorum.