PDA

View Full Version : Label/frame/field with wrap?



celestian
February 1st, 2017, 06:51
Is there a way to have a say... 50x50 cube that the labelres/textres/text is wrapped within that scope if it's to long to fit 50 wide?

Trenloe
February 1st, 2017, 16:23
Have you tried multilinespacing ?

https://www.fantasygrounds.com/refdoc/textbasecontrol.xcp

celestian
February 1st, 2017, 17:06
Have you tried multilinespacing ?

https://www.fantasygrounds.com/refdoc/textbasecontrol.xcp

Nope, thanks for the tip! Didn't see that ;)

celestian
February 12th, 2017, 03:21
So, is there a way to center text in the block instead of it "aligning" to the top? I've got a few fields that are multiline and a few that are one word in the same column... those with just 1 word all align to top even tho I use <center /> so I suspect it doesn't work like I was hoping.

Here is the template I use right now.

<template name="label_savescore">
<stringfield>
<anchored position="right" offset="5,0" width="45" />
<multilinespacing>10</multilinespacing>
<center />
<readonly />
<font>arial-regular-6</font>
<frame name="shaded_box" />
</stringfield>
</template>

Moon Wizard
February 13th, 2017, 03:24
It will automatically center vertically within the defined string control space, but only when multilinespacing is not defined.

If multilinespacing is defined, it will always be aligned with the top of the control.

Regards,
JPG

celestian
February 13th, 2017, 06:23
It will automatically center vertically within the defined string control space, but only when multilinespacing is not defined.

If multilinespacing is defined, it will always be aligned with the top of the control.

Regards,
JPG

Yeah, thats kinda the problem. It aligns to the top. Was hoping I could make it align to center/center (horizontal and vertical).

Thanks for the info!

celestian
February 17th, 2017, 17:49
So, the work around I've figured out was ... in the text I forced a wrap by using "\r". That helped me center up the shorter ones.