0

How to I get the dimensions of a Control if it's using AutoSize? As I have a Panel and I need to know it's Width after it's auto re-sized and PanelName.Width only seems to give the original width.

This is with a Visual C# Windows Forms Application in Visual Studio 2013.

0

1 Answer 1

2

It should give you an actual value, also you can subscribe for SizeChanged event of a control and get actual value in its handler.

Sign up to request clarification or add additional context in comments.

1 Comment

Also any check done after OnPaint() of the control will return actual size. I use it in an old program where language translation is live and control size is crucial.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.