Thread: Anchoring width problem
-
January 8th, 2020, 01:40 #1
Anchoring width problem
I'm too tired to continue for tonight, but I seem to have run into a problem:
I have a frame, and I want a description underneath that frame, in the "below" anchoring position.
...and I can set that up like this:
Code:<template name="charattribute_description"> <stringcontrol> <anchored position="below" width="57" /><!-- Width is being ignored for some reason. --> <font>sheetlabelmini</font> <center /> <nodrag /> <readonly /> </stringcontrol> </template> <charattribute_description> <anchored to="willpowerframe" /> <!-- <anchored> <top parent="willpowerframe" anchor="bottom" /> </anchored> --> <static textres="char_desc_attr_willpower1" /> </charattribute_description>
As you can see, I've tried another method too, that I've commented out, but with that method I can define no horizontal anchor, since the text needs to be centered.
...so I'm going to bed now and hope that you can solve this little puzzle in 8 hours or so.
-
January 8th, 2020, 01:56 #2
Supreme Deity
- Join Date
- Mar 2007
- Posts
- 20,561
The "below" position sets the top, left and right anchors; which is why your width is being ignored (i.e. left and right anchors are already set).
Regards,
JPG
-
January 8th, 2020, 02:00 #3
"below" uses the same width as the object you're anchoring to. If you want to have a width different than your "below" parent you need to use something like "bottomleft" or "insidebottomleft" and adjust alignment.
---
Fantasy Grounds AD&D Reference Bundle, AD&D Adventure Bundle 1, AD&D Adventure Bundle 2
Documentation for AD&D 2E ruleset.
Custom Maps (I2, S4, T1-4, Barrowmaze,Lost City of Barakus)
Note: Please do not message me directly on this site, post in the forums or ping me in FG's discord.
-
January 8th, 2020, 02:03 #4
Supreme Deity
- Join Date
- Mar 2007
- Posts
- 20,561
Also, "belowleft", "belowright", ...
JPG
-
January 8th, 2020, 18:34 #5
Yes, but I want the description CENTERED underneath the frame, and an " anchor="center" " center-to-center anchor doesn't seem to exist.
For example, this doesn't work:
Code:<template name="charattribute_description"> <stringcontrol> Debug.console() <anchored width="57"> <top anchor="bottom" /> <center relation="relative" anchor="center" /> </anchored> <font>sheetlabelmini</font> <center /> <nodrag /> <readonly /> </stringcontrol> </template> <charattribute_description> <anchored to="willpowerframe"> <top parent="willpowerframe" /> <center parent="willpowerframe" /> </anchored> <static textres="char_desc_attr_willpower1" /> </charattribute_description>
-
January 8th, 2020, 20:11 #6
Supreme Deity
- Join Date
- Mar 2007
- Posts
- 20,561
There is no "center" anchor. There is only left/top/right/bottom anchors.
Why not try:
Code:<template name="charattribute_description"> <stringcontrol> <anchored position="below" /> <font>sheetlabelmini</font> <center /> <nodrag /> <readonly /> </stringcontrol> </template>
JPG
-
January 8th, 2020, 21:08 #7
Last edited by MooCow; January 8th, 2020 at 21:21. Reason: Corrected the illustration.
-
January 8th, 2020, 21:35 #8
...and the console repeats this:
"Ruleset Warning: window: Anchored static width ignored for control () in windowclass (charsheet_front)
Ruleset Warning: window: Anchored static width ignored for control (attributeslabel) in windowclass (charsheet_front)"
-
January 8th, 2020, 22:02 #9
-
January 8th, 2020, 22:05 #10---
Fantasy Grounds AD&D Reference Bundle, AD&D Adventure Bundle 1, AD&D Adventure Bundle 2
Documentation for AD&D 2E ruleset.
Custom Maps (I2, S4, T1-4, Barrowmaze,Lost City of Barakus)
Note: Please do not message me directly on this site, post in the forums or ping me in FG's discord.
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks