Since all this Winforms WebBrowser control / Mono.Mozilla / gluezilla business started, there’s one thing that’s been nagging me at that place in the brain where I store stuff I’d rather not think about at the moment (and yes, it’s a place that quite resembles those junk-filled attics you see in movies where the kids go to play and occasionally encounter old moth-eaten dresses, the occasional treasure map or your garden-variety skeleton of the aunt nobody had seen in 50 years - a stuffy, moldy place where you can’t take a step without tripping on something…)…
Alexandre Gomes posted on his blog his experiences getting Winforms+Mono.Mozilla building and running on Windows.
First of all, I’d like to thank him for taking the time to try this out; I’m building regularly on Windows and I try to keep things simple, but things do always slip past unnoticed (especially when trying to keep linux, win+vs2k3 and win+vs2k5 in synch), so it’s great to have an external pair of eyes looking at your stuff :)
It’s been a while since I’ve blogged about the status of Mono’s MWF WebControl - I kept adding stuff, then I wanted to settle it down on the tree, and then I went on vacation and ran out of net (but not out of fish.. yum!). So now that I’m fed up with fish and my net is back, let’s talk about the latest webcontrol milestone.
The code is split up into three components: the WebBrowser and related classes inside MWF (Mono’s winforms implementation); Mono.
… things end up working.
The last blog entry spoke of a successful embedding of xulrunner into a mono winforms app, on windows, and I had hoped that one or two days later I would be blogging about it working on linux as well. Unfortunately, it turned out not to be as simple as that. It actually turned out to be really complicated.
First, while on windows I only had to feed xulrunner with the windows hwnd handle and voilá, it worked, on linux xulrunner uses gtk by default.
It’s a real pity I didn’t have this to blog about yesterday, it would be a really nice way of celebrating Portugal day (which was yesterday, June 10th :) yay for us!). If it weren’t for some pesky bugs yesterday…
Anyway, great blog-worthy news today, got the Mono WebControl -> Gecko thing going, and it’s alive and drawing! Check out this screeny of the mozilla engine rendering a webpage inside Mono…
From the site:
How do I get the Tooltips to be shown on a NumericUpDown control?
This is because of a bug in the .NET Framework. When tooltips are set on a control that hosts other controls within it (like the NumericUpDown), tooltips are not shown on those child controls. To workaround this issue, do the following in code:
[C#] foreach ( Control c in numericUpDown1.Controls ) tooltip.
One of the challenges of implementing the Winforms behaviour from scratch is emulating all the little quirks that have accumulated over the years on Windows and that show up in .NET.
One of these little thingies that make for big headaches is the visual focus cue. You know, that little rectangle that appears in controls whenever they have focus. Well, it turns out this apparently simple thing as showing a rectangle drawn on a button is not so simple at all, because it doesn’t show up every time a control has focus… there are certain rules that control when it should appear (the headache part :p)