Auto-resizing will be a problem, unless you can reset the size via some OnShow, OnLoad, etc. events.
The easy way is actually to just hardcode the text 1, 2, 3 on all hotbars.

(the only problem being that it will not only show on the 1st to 3rd bar, but also on bars that are not controllably via hotkeys)