Mad Props!

Omniscience is just a Google-search away.

Login

You're reading Mabsterama, the weblog of Matt Hamilton. Enjoy your stay.

FireFox and List Margins

Any Mozilla/FireFox CSS gurus out there? Can someone explain how I'm s'posed to make my lists (in the sidebar) look decent?

Here's my current style:

div.sidebox-content ul { margin: 0 0 0 16px; list-style-type: square; list-style-image: url("../images/graystar.gif"); } div.sidebox-content li { font-size: 10px; border-bottom: 1px solid #898989; margin: 4px 0; padding: 0 0 2px 0; } 

In IE7 the lists look fine - they're nicely aligned to the left. In FireFox, however, they have this ugly left margin and sit over in the right of the sidebar boxes.

Maybe I should just tell FireFox users to update to a browser that supports CSS properly! LOL!

ps. Yes, I know that specifying "px" as a font-size is not best-practice, but it's what the Xbox Live Gamercard does, and that's what I'm trying to match, style-wise.

Label.Padding - a Feature Suggestion

Have you ever wanted to place a small image to the left of a label in Windows Forms?

Attaching an image to a label is really easy - the Label control has an Image property. It also has an ImageAlign property, which you can set to MiddleLeft to move the image to the left of the control.

The problem, however, is that the image is still underneath the text. Unlike Button, which has a TextImageRelation property, there's no intuitive way to tell the label to render the text after the image.

The non-intuitive way, which works just fine on the LinkLabel control, is to set the Padding.Left property to something wider than the image. The text is moved to the right by that amount, and you end up with a readable label with an image. However, the Padding property on Label affects both the image and the text! The image stays under the text and you just end up with blank space on the left of the control!

I've made a feature suggestion on Microsoft's Product Feedback site, in the hope that they can give us some workaround to make labels' image and text properties play nicely together. Vote on it if you agree!

InfoCard and Device Theft

The other day Andrew Stopford blogged about InfoCard, asking what happens if your PC is stolen. Does the thief get access to your "cards", and therefore any web site that you use them to log into?

I'm about 20 minutes into this video on Channel9, which explains the architecture of InfoCard, and in it Charles asked the same question. The answer, however, hasn't satisfied me.

The resopnse that architect Arun Nanda gave was that the cards themselves don't store information - only a list of "claims" that the card provider can make on your behalf. When you submit the card to a site, you still need to authenticate with the card provider to prove that you are who you say you are.

So how do I prove my identity to the card provider? Another InfoCard? That way lies infinite loops. A username and password? How is that different from having to enter a username and password to the original site?

Anyone out there close enough to InfoCard to give a solid explanation of why it's still secure if your PC is stolen?

Xbox Near-Disaster (kind of)

Oh, man. That was close.

This morning I finally got around to updating my Logitech Harmony 880 remote so that it knew about the Xbox 360. The standard activity settings - switch the TV to the right channel, turn on the receiver and switch it to the right input, and turn on the 360.

While testing it, I switched to the "Play Xbox 360" activity, and then a few seconds later switched back to the "Watch TV" activity. It worked pretty well. The Xbox turned on and off as expected.

However, turning the Xbox 360 off seconds after turning it on is apparently not a good idea. The act corrupted my gamer profile and I could no longer sign in to Xbox Live!

I tried the "Recover GamerTag from Xbox Live" steps, which failed at the last minute, telling me that my profile couldn't be recovered. That sounded bad. I then went to the System blade and checked out what was currently on the hard drive. One gamer profile (Crucible's) and one "corrupted profile". I deleted the corrupted one, and then (thankfully) was able to recover my profile from the net.

Thank god I didn't lose any save games - I'm more than half way through GRAW on hard difficulty after completing it on normal! Didn't want to start again!

Operation: Dinner Out

Wow. Just got home from a night out for tea with the folks.

Albury has a lot of great restaurants, particularly given that it's only a town of about 45,000 people, but by far our favourite place to dine is Scape. It's a relatively new place, and features some really interesting dishes.

For example, tonight I had Moroccan lamb with rosemary ice-cream and maftoul (Israeli cous-cous). Lamb and ice-cream? Yep. Spectacular. Mum had pork hock with ginger mousse and some sort of sweet chilli sauce. Outstanding.

If you're ever stuck between Melbourne and Sydney and looking for some place good to eat, I can't recommend Scape highly enough.

You know this whole post was just an excuse to tell you I just had meat with ice-cream, right?

DataGridView CellPainting Goodness

Here's a screenshot of a form from one of the projects I'm working on right now. I'm posting this to give people an idea of what's possible if you use the CellPainting event in the DataGridView control to override how your grid is painted.

What I'm doing here is displaying the contents of two different child tables in the same grid cell as the parent table row. One set of child rows is being rendered as a bar graph, the other is simply being written as plain text. This gives the user a really rich visual experience when he would otherwise be looking at a simple list of category names. Click on the image for the full-sized version:

Categories Form with DataGridView.CellPainting

Pretty cool, huh? It's a "web 2.0" sort of effect in a Windows Forms app. A testament to what the plain old DataGridView control is capable of.

Yummy!

This new skin (which I have dubbed "mabster360") has opened up a whole world of possibilities.

At the risk of too much "blog flair", I'm adding a whole bunch of new sidebar boxes with content specific to me. For example, you've probably already noticed my Xbox Live Gamercard box over there.

If you look down towards the bottom of the sidebar now, you'll notice my new "yummy links" box. It shows the last ten things that I have posted to del.icio.us (hence the box's title). Having this new box will probably inspire me to save more links in del.icio.us so that others can see them on my blog.

One day my sidebar will stretch down so far that you'll have to spend the better part of a day scrolling to see it all. When that day comes, my work here will be complete. :-)

Windows Media Player 11 (Beta 1)

Just installed beta 1 of Windows Media Player 11 here at home. Wow! Pretty slick. Visually it's an improvement over the already-quite-nice WMP 10, especially with the new ways to look at playlists. Here's a screenshot courtesy of microsoft.com:

Windows Media Player 11

The "album stacks" aren't faked - you can see other albums by the same artist (or in the same genre etc) underneath the topmost one. Very cool.

If you want to try it out, you can download the beta here. Recommended!

I CAN SKIN!!!

Thanks to a great tutorial on Community Server skinning by Stuart Celarier, I can now create my own skins for this blog!!!

So welcome to the new-look Mabsterama. It's going to change over time as I get more comfortable with what's possible, and if something looks out of place please let me know by leaving a comment on this post.

Back from the User Group!

Tonight was the first meeting of what will probably be known as the Albury/Wodonga .NET User Group (awdnug?).

We had seven people attend, which was great for a first meeting. Anthony (who organized the whole thing with a call-to-arms at Code Camp Oz) had plotted out a loose agenda for the night - the usual things you'd want to discuss at an inaugural meeting. Things like "what do we call ourselves?", "what are our goals?", "why do we have to wear these mu-mus?" (alright, maybe not the last one).

For posterity's sake: The meeting will henceforth be held at 7:30-9pm on the second Wednesday of each month, and for now it's going to be in the Committee Room at the Commercial Club Albury.

We had a good mix of guys, representing three or four different companies from the region (none of which I'd heard of, which surprised me). A good mix of languages and platforms, too, ranging from C# and VB.NET to SQL and even LAMP (Linux/Apache/MySQL/PHP).

I kind of volunteered to do part of the first presentation, which will be at next month's meeting. It will be about what software we should use to run the inevitable web site, and of course I'm gunning for Community Server (the other part of the presentation will focus on DotNetNuke). I'm kind of hoping my cyber-budd Dave will be able to help me out with some key points to present, and perhaps some URLs of some sites that are doing outrageously interesting things with CS. How 'bout it, Dave?

So right now things are looking very positive. Hopefully we'll get a web site going within the next few months, with some active forums, hosted content like slideshows and code samples, and maybe even some blog space for our members. Check back here for more details regarding the URL.