 |
|
 |
Hi guys, this is very nice control
Can you explain to me, how to draw formated text in a single line and multiple line (wraped text)?
Good Job
thanks
|
|
|
|
 |
|
 |
Why would this happen. I am assigning an HTML string to HTML property.
"Unable to cast object of type 'System.Collections.DictionaryEntry' to type 'QuickZip.MiniHtml.PropertyItemType'."
|
|
|
|
 |
|
 |
Hi i found ur control very suitable for my application.
However there is one problem?
I m unable to find out how can i display image on label using css or without css.
Aspiring Techie,
Vishnu Nath
|
|
|
|
 |
|
 |
Anyone considering using this control should take a look at Gobicode's HTMLLabel for Windows Forms. The HTMLLabel is a professional control which renders HTML formatted text, images and loads more to boot!
The control written about in this article has a text alignment issue which makes rendered text appear less than desirable (this can be seen in the screenshots above). This issue is shared by all the 'free' HTML controls that I've found. Gobicode's HTMLLabel control does not suffer from this problem, those looking for quality rendering should check it out.
|
|
|
|
 |
|
 |
It's very tempting to use this control as a replacement to a label, but in some cases you would need a label that can auto adjust its size so that the rest of the UI would be slim around the content of the label.
You can do this by setting AutoSize to true and a MaximumSize of the label, fill it with text and then use PreferedSize to size the control to it's real extent.
You provide requiredHeight, which takes care of the major issue, but it would be excellent if there also was a requiredWidth which would give you the longest line width which is inside of the MaximumSize/width of the control.
What I need to achieve is a MessageBox like form that automatically adjust the size of the form to be as small as possible in both vertical and horizontal extents.
Edit: It would also be nice if it would wrap only at blanks and not in the middle of a word. This seems to work but not if it's a sentence in href link block.
Cheers
/Jonas
-- modified at 4:19 Friday 2nd November, 2007
|
|
|
|
 |
|
 |
In general, it seems to treat stuff inside tags as blocks that are rather generate a new line before the block than somewhere inside the block, not only "a href" but also "b" "u" and so on.
Cheers
/Jonas
|
|
|
|
 |
|
 |
"the GDI+'s measure width is very inaccurate, I have to estimate the true width (e.g. TextWidth - 2) when positioning the texts. Now I know Graphics.MeasureCharacterRanges, but I still dont understand why dont they make TextWidth return true width."
Lee Paul Alexander has also encountered this problem in his Outlook Style Grouped List Control. He decided to use wrappers to GDI (not GDI+), which you can find in his code. Lee explains why he chosen this solution here.
Greetings - Gajatko
|
|
|
|
 |
|
 |
I don't see it displaying the HTML.
|
|
|
|
 |
|
 |
Any suggestion?
|
|
|
|
 |
|
 |
This is great! Keep up the good work
|
|
|
|
 |
|
 |
Interesting idea, you should write an article to go with it.
|
|
|
|
 |
|
 |
I hope you are OK with me asking all these questions. I am very excited using your control. How can I get the contents of a font tag to have certian backcolor. I was hoping there would be some simple bgcolor color tag, in my app I would like to switch off the CSS parts for now, I dont want the user to have too much control, so ideally I would like the back-color tag to go into the font, and not be a CSS property.
I really rate this control!
|
|
|
|
 |
|
 |
Add the following in Tags.cs around line 697, in RegionTag.UpdateState
case tagType.paragraph:
if (variables["bgcolor"].value != "")
curState.bkColor = Utils.WebColor2Color(variables["bgcolor"].value);
break;
Then you can use <p bgcolor="lime"> to change background color.
I am busy this week, I will answer your questions next week.
|
|
|
|
 |
|
 |
Thanks, in the meanwhile if I have any further questions, I'll post them here.
Be well!
|
|
|
|
 |
|
 |
If you try and render the HTML label control whilst the window is minimized the application crashes at the line:
mhOutput.Image = new Bitmap(mh.widthLimit, (Int32)(mh.documentOutput.Height()));
I simulated this by html rendering on a time tick event and then minimizing the form.
|
|
|
|
 |
|
 |
I believe the picture box have a width 0 when minimized, you can change the line
mh.widthLimit = 10,mhOutput.Width; to
mh.widthLimit = Math.Max(10,mhOutput.Width);
|
|
|
|
 |
|
 |
I have been playing with the control for an hour and I love it, I tied the html rendering to a timer and have it fire the ticks of Datatime.now every *milisecond* it responded amazingly!!!!
I was wondering if there is a way I can put an image in an anchor, in my case I dont want the image in the anchor to be underlined, but it should be clickable.
Also have you go any further with the spacing issue you have??
Lastly if you go into the Editor on the compiled demo and start editing the grey text so that it goes onto the next line, then you press the back space a few times, till it goes onto the previous line, the app crashes.
|
|
|
|
 |
|
 |
I will update the source code soon,
The following code fix Image not clickable :
Selection.cs (line 63) in the end of MiniHtmlCursor.SetCursor(), add the following
if (selectedTag == null)
selectedTag = parentHtml.documentOutput.GetFocusTag(aPos.X, aPos.Y);
Tags.cs (line 1547) in the start of ElementTag.Update(), add the following
if (!pNeedUpdate || !curState.visible)
{
return;
}
base.Update(ref curState);
pNeedUpdate = false;
CurrentStateType.UpdateState(ref curState);
|
|
|
|
 |
|
 |
No further spacing issue, it's very accurate now.
The editor component is not completed and is very buggy, I do not suggest you to use it in production environment.
|
|
|
|
 |
|
 |
I woud like to use this software in a commercial program, it makes up a tiny part of the program, your license seems not to allow this without me offering my source code also for free, is this correct?
|
|
|
|
 |
|
 |
You can use, I will update the license in next update, and add the following :
-------------------------
The library is released under the GPL with the following exception:
Linking this library statically or dynamically with other modules is making a combined work based on this library. Thus, the terms and conditions of the GNU General Public License cover the whole combination.
As a special exception, the copyright holders of this library give you permission to link this library with independent modules to produce an executable, regardless of the license terms of these independent modules, and to copy and distribute the resulting executable under terms of your choice, provided that you also meet, for each linked independent module, the terms and conditions of the license of that module. An independent module is a module which is not derived from or based on this library. If you modify this library, you may extend this exception to your version of the library, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version.
Bottom line In plain English this means you can use this library in commercial closed-source applications.
-------------------------
|
|
|
|
 |
|
|
 |
|
|
 |
|
 |
How we can write a rich text editor with this control that write left to right or right to left. also draw image and table.
|
|
|
|
 |
|
 |
Editor - Although this component included a semi working WYSWYG editor, this editor is not completed, and it can only edit text and paragraph only.
RightToLeft - I didnt implement RightToLeft when I design the component (fool me), you will need to rewrite SpaceAllocator object in SpaceAllocator.cs.
Image - The included editor does not have add image support.
Table - Table is not implemented (both view and edit)
|
|
|
|
 |