I’m trying to show some additional information on nodes, the count and type of children in subtree to be precise. It works more or less okay:
The problem is the textblocks are not properly centered on shapes, and since they have fixed positions they wont work with double-digit numbers. I’m using Panel.position to set it up (of all panel types, this gave me the closest aproximation of what I want). Is there any way to center it properly? The code for current version is this:
Ah, you shouldn’t be setting the width/height of the Shape then – either set the size of the whole panel, if that is what you want, or don’t set anything, if you want each panel to be their natural size.
If you want each panel to be a fixed size and the text to automatically get smaller as the string gets longer (or if you make the font bigger), you could use a “Viewbox” Panel there so that it automatically scales the TextBlock to fit in the fixed size panel.
Also, you can set the Shape.spot1 and Shape.spot2 properties so that there is less margin around the text inside the non-rectangular shape. If you are sure to only have one or two digit numbers there, and if the Panel is big enough or the font is small enough, then this might avoid using Viewbox Panels.
Unfortunately this does not change anything for the better. When I remove widths an heights the textboxes are still not centered, and their size changes depending on the number of digits present.
As for the automatic size changes you mentioned, there is no need for that in this case. I need both circles to be of the same size, with the same font size. There won’t be more than 2 digits.
Yes, that is exactly what I’m getting. The labels are stil too high and too far to the left
I know I’m being infuriating with pixel precision here and I’m terribly sorry for that but I know for a fact that this won’t pass testing and I’ll have to resolve it one way or another.
If there is no way to make it work then I guess it’ll have to do, but is there really no way to do some manual adjustments?
Really sorry for nitpicking, I’m on the receiving end here too.