How can i make WinForms TabPage header width fit it's title? Here is the problem.
相关问题
- Sorting 3 numbers without branching [closed]
- Graphics.DrawImage() - Throws out of memory except
- Why am I getting UnauthorizedAccessException on th
- 求获取指定qq 资料的方法
- How to know full paths to DLL's from .csproj f
You need to measure the fonts.
Try something like this:
Probably add a bot extra on for padding (width = width +10)
Edited:
The native Windows tab control allows overriding the default minimum tab width. Sadly that capability is not exposed in the TabControl wrapper class. That's fixable though. Add a new class to your project and paste the code shown below. Compile. Drop the new control from the top of the toolbox onto your form.
Thanks, Hans. I used your code without creating a class