I think it already does this. Dont specify a height or width and the tooltip will automatically resize to its content. I tried this out a little while ago and just added a table to the tooltip. I added fields to the columns and the tooltip increased inside to accomodate it.