This works for any item that has randomly generated properties, or chests with randomly generated contents, etc. Hitting the alt key will set an item's properties (or an NPC's trade inventory), in addition to running your mouse over it.