Archive for August, 2007

Tabs with a ToolStrip

Thursday, August 30th, 2007

Tabs XP Style

Tabs Classic Style

I’ve been working on a little text editor project recently and wanted a tabbed list of documents (ala Firefox). I found a couple free solutions on the web including a project on The Code Project, but I thought I could do one better. It occurred to me that it wouldn’t take much work to customize a ToolStrip to look and behave like tabs. Why make my own tab control when there already exist one you ask? Call me picky, but I’ve never like the TabControl that ships with .NET. I find it a little clunky. I also don’t like the look of the tab pages or that I have to place everything I want in the tab within a tab page. What I wanted was a control that was just the tabs and would let me decide what to show based on the tab selection events, and not the extra bloat that goes along with the TabControl. Yes I could just reduce the size of the TabControl so that only the tabs were showing but I’m not comfortable with the idea of hiding a big portion of the control just to show the part I wanted.

I’m happy to report that my little experiment is working perfectly! After setting a number of built-in properties on the ToolStrip and ToolStripButton to make them behave a little more like tabs it was simply a matter of creating a custom ToolStripRenderer to give it the appearance of tabs. That was also a breeze using the VisualStyleRenderer to give them the XP theme style of tabs.

(more…)

The Company

Thursday, August 23rd, 2007

A quick plug for The Company, a mini-series produced by TNT that I just finished watching. If you like a good drama, a little mystery, and stories that are based in fact you might enjoy this (fictitious) look into the CIA. It doesn’t try to compete with shoot-’em-up shows like 24, but rather, keeps a steady pace of character development. What more could you ask for? Chris O’Donnell, Michael Keaton, Alfred Molina, spy gadgets, Cold War espionage, etc….

Oh ya, there is one thing I could ask for… more episodes. The entire series is only six hours long.

If you missed it, don’t worry, I’m sure TNT will air it again, and again, and again.

Ever Heard of a Leash?

Monday, August 20th, 2007

I laughed out loud when I saw this. (Somebody needs to have a talk with these people.)

View Photo

Busy Summer

Wednesday, August 15th, 2007

Well I’m almost out of SPF 50 sunblock which means that we’ve been having a fun summer. If you think I’m joking about SPF 50, then you haven’t seen my beautiful white sheen; I have to stay looking young you know? (and prevent third degree burns).

Emily finally got around to putting up pictures from our Santa Barbara trip on her blog.

I’ve been busy with work lately as we’re preparing to release some code that I’ve been working on for the past four to six months.

We’ve been going to the pool almost every chance we get.

I’ve even made it to the theaters to see Transformers and The Bourne Ultimatum.

Consequently I’ve had almost no time to work on any personal projects, but… who cares when you’re having fun?

Debugging JavaScript with Visual Studio

Wednesday, August 1st, 2007

I recently had a situation at work where I had to do some deep debugging of JavaScript. As an ASP.NET developer, I rarely have to hand-write JavaScript now days and when I do it requires little more than some well-placed ‘alert’ calls to diagnose problems. However, this situation was different. We recently started using the ASP.NET AJAX Extensions in our company website. Initially I was excited to try some of the new features but alas my excitement quickly waned when I found that many of the supplied controls did not play well with our website. I should be clear that I’m referring specifically to the ASP.NET AJAX Control Toolkit, a community created set of control extenders that use the AJAX library. I’m only speaking from my own experience, but it quickly became apparent to me that the ASP.NET AJAX Control Toolkit was only half-baked. I had popup controls popping up in the wrong places, watermark controls returning their watermark contents instead of their actual values, and the list goes on. By the time I realized it, it was too late and we had already promised some of the advanced features to our clients. My task today was to figure out why the CollapsiblePanel was no longer working after we moved our code into our test environment. I was going to have to debug some JavaScript… ugg!

(more…)