Patch fixes TreeViewAdv.AutoSizeColumn(TreeColumn column) behavior for non default tree Fonts.
Does _measureContext.Font not being updated in some cases ?
As I remember - yes. Erroneously calculated width. It was a long time and in my branch this patch applied.
In method TreeViewAdv.AutoSizeColumn(TreeColumn column) local variable DrawContext context created but not used for calculate column width.
When you change the font, 'OnFontChanged' is invoked.
Yes, but _measureContext.Font updated after call event handlers(base.OnFontChanged(e), see source).
With patch control work correctly in complicated cases.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The matter is that this issue is supposed to be resolved using
'_measureContext.Font'
instead of being bypassed according to the design paradigm of the project.
As I see correct, Instancing a new DrawContext object is redundant and
should be removed from 'TreeViewAdv.AutoSizeColumn'
One might swap the two lines (highlighted in purple) in
'TreeViewAdv.OnFontChanged'
to resolve the issue you've just addressed.
If you already tried these ways and none of them work and/or there's a
design flaw in TreeViewAdv/.Net framework.
Then I'll ask you to send me an example program showing the issue.
Patch fixes TreeViewAdv.AutoSizeColumn(TreeColumn column) behavior for non
default tree Fonts.
Does _measureContext.Font not being updated in some cases ?
As I remember - yes. Erroneously calculated width. It was a long time and
in my branch this patch applied.
In method TreeViewAdv.AutoSizeColumn(TreeColumn column) local variable
DrawContext context created but not used for calculate column width.
When you change the font, 'OnFontChanged' is invoked.
Yes, but _measureContext.Font updated after call event
handlers(base.OnFontChanged(e), see source).
With patch control work correctly in complicated cases.
Patch fixes TreeViewAdv.AutoSizeColumn(TreeColumn column) behavior for non default tree Fonts.
In method TreeViewAdv.AutoSizeColumn(TreeColumn column) local variable DrawContext context created but not used for calculate column width.
With patch control work correctly in complicated cases.
Just came back from vacation, thus the delay.
The matter is that this issue is supposed to be resolved using
'_measureContext.Font'
instead of being bypassed according to the design paradigm of the project.
As I see correct, Instancing a new DrawContext object is redundant and
should be removed from 'TreeViewAdv.AutoSizeColumn'
One might swap the two lines (highlighted in purple) in
'TreeViewAdv.OnFontChanged'
to resolve the issue you've just addressed.
protected override void OnFontChanged(EventArgs e)
{ base.OnFontChanged(e);
_measureContext.Font = Font;
FullUpdate();
}
If you already tried these ways and none of them work and/or there's a
design flaw in TreeViewAdv/.Net framework.
Then I'll ask you to send me an example program showing the issue.
On 11 September 2014 12:09, ssdi ssdi@users.sf.net wrote:
Related
Bugs: #49