Page 1 of 1

AutoWidth

Posted: 29 Jun 2010, 07:23
by TickTick
Hello!

One feature that I really miss is an "Autowidth" property.
But even if you wanted to include such a feature in e. g. the checkbox, radar button, it would break compatibility, that's why you are not doing it, right?

Regards!

Re: AutoWidth

Posted: 29 Jun 2010, 18:01
by TiKu
For such a property I would have to draw the controls myself (to measure the desired width). This is something that I really want to avoid. I want my controls to be drawn by Windows, so that they look native.

Re: AutoWidth

Posted: 29 Jun 2010, 18:12
by TickTick
Okay, I didn't know what exactely you do yourself and what you have done by Windows.

Thanks for the reply!

Re: AutoWidth

Posted: 29 Jun 2010, 21:46
by TiKu
You're welcome.

To go a bit more into detail: There's one control that I actually do draw myself: The Frame control. The reason for this is, that the control flickered alot (under certain circumstances) as long as it was drawn by Windows. Since the Frame control isn't that difficult to replicate and since the flickering was really ugly, I decided to draw this control myself (I use the system settings and the theming API as much as possible though).
Other than that, I do some customized drawing here and there (e. g. I add the close buttons to the tabs in the TabStrip control after Windows has done its drawing), but I do not owner-draw anything.

Okay, if you use the Animation control to play a GIF animation, this is drawn by my code, too. But that's something different...