Displaying 3 results from an estimated 3 matches for "myhtmlwindow".
Did you mean:
htmlwindow
2007 Jul 21
0
[1138] trunk/wxruby2/samples/html/html.rb: Place HTMLWindow in a panel so gets correct bg color on MSW
..._READONLY)
</span><span class="cx"> top_sizer.add(@addr_bar, 1, Wx::ALL, 4)
</span><span class="cx"> sizer.add(top_sizer, 0, Wx::EXPAND|Wx::TOP|Wx::BOTTOM, 4)
</span><span class="cx">
</span><del>- @html_win = MyHtmlWindow.new(self, -1)
</del><ins>+ @html_win = MyHtmlWindow.new(panel, -1)
</ins><span class="cx"> @html_win.set_related_frame(self, ''HTML Window: %s'')
</span><span class="cx"> @html_win.set_related_status_bar(2)
</span...
2006 Nov 06
3
HtmlWindow and friends
Hi
Attached is a patch to add HtmlWindow and some of its friends, including
HtmlEasyPrinting. Also a sample.
I haven''t tried exposing the parsing and rendering API yet to allow
custom tags etc - I just wanted to get basic HTML and the 0.6.0
compatibility classes first. There may well be some quite easy classes left.
There''s one ugly kludge to get OnOpeningURL to compile -
2006 Nov 12
0
[724] trunk/wxruby2: Initial commit of HtmlWindow functionality
...+
+begin
+ require ''wx''
+rescue LoadError => no_wx_err
+ begin
+ require ''rubygems''
+ require ''wx''
+ rescue LoadError
+ raise no_wx_err
+ end
+end
+
+require ''net/http''
+require ''uri''
+
+class MyHtmlWindow < Wx::HtmlWindow
+ attr_reader :html_src
+ def load_page_from_uri(uri)
+ case uri
+ when URI::HTTP
+ Wx::BusyCursor.busy do
+ res = Net::HTTP.start(uri.host, uri.port) do | http |
+ http.get(uri.path)
+ end
+ @loaded_uri = uri
+ set_page(res.body...