Dynamical width for custom widget?

My question is, is it possible to make custom widget width dynamic?

4 replies