So as you can see, building context menus is quite a bit more complicated than it looks from the outside!

Another good "UI is more complex than pictures" example.