I have searched over the infragistics libraries and forums and have not been able to find the answer to this question:
I have an UltraTree with a parent node which has multiple child nodes (on the same level,) each of the child nodes has a number and a date, the numbers are different lengths and what I want is to evenly space them so they display in a professional manner. I have tried using vbTab (which does not print a tab in the node text) or the UltraTreeColumnSet (but I don't want column headers in my display.) I have also tried using a certain number of spaces but the space character is not the same size as number characters so the spacing is still uneven.
ie:
(even above you can see the dates do not align correctly)
Any insight would be greatly appreciated!
You will probably have to use spaces or tabs, but use a Fixed-width font like Courier New. The default font, like MS Sans Serif have variable width characters, so there's no reliable way to line up text like this.
Thanks for your response Mike! It appears that courier new does align properly great idea! The rest of my project is in Arial and this is somewhat of the standard. You mentioned using tabs in the node text... when I try to enter a tab in the node text (vbtab) the result is a square character not tab, is there a way around this? Or perhaps a way to make arial characters all take up the same amount of space? Thanks again for your help!
mcmTrade said:when I try to enter a tab in the node text (vbtab) the result is a square character not tab, is there a way around this?
Hm, that's odd. It must have something to do with how the cells draw their text. I would have thought tabs would be supported in a cell, but I guess that's not the case. The only way to get around that would be to use a DrawFilter and draw the text yourself.
mcmTrade said:Or perhaps a way to make arial characters all take up the same amount of space?
No, I'm sure there's no way to do that. But I think there are probably other fixed-width fonts besides Courier New. Although, I'm not sure what they are.
Thanks Mike, I think I'll go with a fixed width font similar to arial.