Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
849
AutoSize for controls inside a WinGridBagLayoutPanel
posted

Hello,

I have a pretty standard layout in a WinGridBagLayoutPanel: 1 column for labels, 1 column for editor controls (textboxes, grids...). My application supports different languages so what I want is the width of the label column to adjust to the content of the labels (French texts are usually longer than English ones).

What I have tried to do is set the AutoSize property on my UltraLabels to true, thinking naively that if they get wider than the column, they would "request" more space to the WinGridBagLayoutPanel. But this does not seem to be the case...

Is there a way to achieve that?

Thanks,

Damien