You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
we updated from 5.01 to 5.4. now in trees where we have multiline nodes. the multiline column is as normal. but all other columns have now the text centered. we do not want this.
the problem is that in "TCustomVirtualStringTree.PaintNormalText" there are the following new lines in V5.4:
// Center the text vertically if it fits entirely into the content rect.
if R.Bottom - R.Top > Height then
InflateRect(R, 0, (Height - R.Bottom - R.Top) div 2);
this crops the rect and paints the text in the center.
we made a patch-file wich should upgrade the virtualtreeview to support vertical alignment in the column definition. therefore a user can setup the column to paint the text as in V5.01 (top) or V5.4 (center) or new (bottom).
Multiline.7z is a test-project for the new verticalalignment property.
VirtualTrees.pas.patch is the TortoiseSVN-patch file.
please check if we did this properly. we do not often code on components themself. also check the names for coresponding to your coding standards.
we updated from 5.01 to 5.4. now in trees where we
have multiline nodes. the multiline column is as
normal. but all other columns have now the text centered.
At least as default behavior the vertically centered text is a better solution than a vertically top aligned text. The Windows Explorer does the same in case it has multiline items, see the attached screenshot.
we made a patch-file wich should upgrade the
virtualtreeview to support vertical alignment
in the column definition
I personally don't see a need to have different vertical alignments for different columns. But I can understand that someone wants a different default behavior for the entire tree.
There is already some support for vertical alignment in the current source code: The property TBaseVirtualTree.VerticalAlignment
We should consider using this and fix TCustomVirtualStringTree.PaintNormalText() so that it considers this property. If that has been fixed, we just need to allow defining a default value, instead of the fixed value 50(%).
From [email protected] on April 30, 2014 18:41:16
Hi,
we updated from 5.01 to 5.4. now in trees where we have multiline nodes. the multiline column is as normal. but all other columns have now the text centered. we do not want this.
the problem is that in "TCustomVirtualStringTree.PaintNormalText" there are the following new lines in V5.4:
// Center the text vertically if it fits entirely into the content rect.
if R.Bottom - R.Top > Height then
InflateRect(R, 0, (Height - R.Bottom - R.Top) div 2);
this crops the rect and paints the text in the center.
we made a patch-file wich should upgrade the virtualtreeview to support vertical alignment in the column definition. therefore a user can setup the column to paint the text as in V5.01 (top) or V5.4 (center) or new (bottom).
Multiline.7z is a test-project for the new verticalalignment property.
VirtualTrees.pas.patch is the TortoiseSVN-patch file.
please check if we did this properly. we do not often code on components themself. also check the names for coresponding to your coding standards.
cheers
Attachment: Multiline.7z VirtualTrees.pas.patch
Original issue: http://code.google.com/p/virtual-treeview/issues/detail?id=433
The text was updated successfully, but these errors were encountered: