View Single Post
07/01/21, 04:38 AM   #1
rp12439_3
AddOn Author - Click to view addons
Join Date: Jun 2021
Posts: 45
Flexible height of 2 panels / correct positioning

Hi there,

it should be simple but it isnt (for me). For some hours I am trying to position 2 labels with dynamic content directly beneath one after the other.
This is not working They are allways placed in the center of the control.

The text is set with the setText(string) function and is an item property (GetItemLink...). Thats why the contentheight differs. The control height will be set with GetTextHeight and so on. But this is making it currently worse They are truncated all the time and not correclty positioned.

This should be simple or not? There is definitly something wrong with the second anchor wich defines the height of the label... if its just one row (without second anchor) its working.

What am I not seeing?

Here is the (simplified) xml of the 2 labels:

<GuiXml>
<Controls>
<TopLevelControl name="CraftyStockListTooltip" hidden="true" mouseEnabled="true" movable="false" clampedToScreen="true">
<Dimensions x="300" y="500" />
<Controls>
<Backdrop name="$(parent)BG" inherits="ZO_DefaultBackdrop" />

<Label name="$(parent)ItemTex1" font="ZoFontGameLargeBold" color="CFDCBD" wrapMode="ELLIPSIS" verticalAlignment="TOP" text="">
<Anchor point="TOPLEFT" relativeTo="$(parent)" relativePoint="TOPLEFT" offsetX="15" offsetY="10"/>
<Anchor point="BOTTOMRIGHT" relativeTo="$(parent)" relativePoint="RIGHT" offsetX="-15" offsetY="-5" />
</Label>

<Label name="$(parent)ItemTex2" font="ZoFontGameLargeBold" color="CFDCBD" wrapMode="ELLIPSIS" verticalAlignment="TOP" text="">
<Anchor point="TOPLEFT" relativeTo="$(parent)ItemTex1" relativePoint="BOTTOMLEFT" offsetX="15" offsetY="10"/>
<Anchor point="BOTTOMRIGHT" relativeTo="$(parent)" relativePoint="RIGHT" offsetX="-15" offsetY="-5" />
</Label>

</Controls>
</TopLevelControl>
</Controls>
</GuiXml>
  Reply With Quote