Archive for November, 2009
Setting HTML for WebBrowser in C#
Today I tryed to insert HTML for WebBorwser
in C#. I thought it’s a simple task. But when I tryed to use DocumentText
property I got “”. Then I tryed Document.Write("...")
and I got that Document
is null
. After these tries I started to find out the easiest way to fill the WebBrowser with HTML without writing to disk and navigating the written file. Here is my code:
WebBrowser browser = new WebBrowser(); browser.Navigate("about:blank"); browser.Document.Write("..."); |
When the WebBrowser
has been made, the Document
object is null
. So, we should call Navigate()
method to get Document
available.
If You have Your way to fill the WebBrowser
with HTML I’m expecting for Your comments
Creating dialog in CodeCharge Studio
This article provides CodeCharge Studio developers with a truly easy way to create a custom IDE dialog for different purposes. Here You will learn how to extend CodeCharge Studio with Your own dialog. I am going to explain how to create a custom dialog through an example. We will create together a dialog for embedding a Flash movie into the page. See online example to understand what You will be able to do with help of the dialog. Also, here You can download a source code of the dialog and extend Your CodeCharge Studio with it. In addition to downloading a source code You can download a test project that has a page where a Flash Movie embeded by this dialog. So, let’s start!
Inline YUI AutoComplete layout
Recently, i had a problem with YUI AutoComplete layout. I wanted it being inline, fixed width and working with different browsers like IE6/7/8, Opera, FF etc. There were some problems that i solved primarily in CSS. More precisely, i needed an inline YUI AutoComplete layout in such a way that i can place autocomplete next to the
So, problems i had to solve for my needs:
- an outer container is a DIV so INPUT always goes on the next line
- inline-block for DIV doesn’t work in IE6/7
- an outer container has width of 100%
- INPUT is absolutely positioned so an outer DIV is collapsed
- width of 100% makes INPUT 6px larger then outer DIV in IE6
- using inline-block, INPUT aligns vertically on the bottom in IE6