Author Topic: Right aligned element/child overlap with differing fonts.  (Read 3546 times)

sleepless

  • Sr. Member
  • ****
  • Posts: 287
I'm hoping someone can help me with this:
I'm trying to create a field that reads "Album (year)" using an element/child sequence, which is aligned to the right edge of the screen. What I get is that the element "album" and the child "(year)" are both right aligned to the edge, and so overlap each other. The problem is that any time a child's font is altered, it re-aligns itself and ends up overlapping. Here's what I got:

<element type="Field" id="Album" xAnchor="Panel.Right" x="-300" yAnchor="AlbumCover.Top" y="-12" width="300" align="Right" font="OpenSans" style="Bold" size="10" fg="200,200,200" >
   <child  font="OpenSans" style="Regular" size="9" fg="200,200,200" >  (</child>
   <child  id="Year(yyyy)"  font="OpenSans" style="Regular" size="9" fg="200,200,200" ></child>
   <child  font="OpenSans" style="Regular" size="9" fg="200,200,200" >)</child>
</element>

I suppose I could find some messy work-around, but I was hoping someone here might be able to tell me the right way to go about this. I'm obviously clueless.

redwing

  • Guest
Try with something like this:

<element type="Field" id="Album" xAnchor="Panel.Right" x="-500" yAnchor="AlbumCover.Top" y="-12" width="500" align="Right" font="OpenSans" style="Bold" size="10" fg="200,200,200" >
<child> (</child>
<child  id="Year(yyyy)"  size="9"></child>
<child>)</child>
</element>

sleepless

  • Sr. Member
  • ****
  • Posts: 287
Thanks. Still have the problem though.  I had tried something similar, which fixes the overlap issue, but the font size doesn't change.  It remains at size 10 for both the Album and (year). Is it just not possible to use a different font for the child when using the align function?

redwing

  • Guest
Is it just not possible to use a different font for the child when using the align function?

Looks like it. Without align setting, this works.

<child id="Year(yyyy)" font="OpenSans" style="Regular" size="5"></child>

You could separate those fields into two without using child or ask Steven for help.