-
June 6th, 2015, 15:58 #1
Question on dynamic resizing on the core CT
I've been banging my head against this for about four hours now and I can't figure out how this is being pulled off. So I thought I'd ask.
Ok, so in the core CT when you toggle the effects of a particular entry on/off or add/remove an effect the entry resizes and the list moves to accomodate. I want to add a feature like this on the character sheet I'm doing at the moment.
I've poured over the code in core and the answer is eluding me.
How in the heck is this happening?
I don't need a long huge explanation, just to get pointed in the right direction or just a general overview.
-
June 6th, 2015, 16:09 #2
Look at the Notes tab on 5e Char Sheet?
Or Actions when you click on a magnifying glass.
-
June 6th, 2015, 16:09 #3
The controls use relative anchoring. See the "Anchoring" section here: https://www.fantasygrounds.com/modguide/windowing.xcp specifically the "relative" option. The controls that appear/disappear when the relevant buttons are pressed are all anchored on the same control: <string_ctname name="name"> with the top anchor of these controls all being "relative" to this "name" control. For example:
Code:<anchored> <top parent="name" anchor="bottom" relation="relative" offset="10" />
It's a very powerful way of dynamically altering GUI layout as controls are added/removed (made visible/invisible).Last edited by Trenloe; June 6th, 2015 at 16:15.
Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!
-
June 6th, 2015, 16:12 #4
Wow. Ok, thanks! I think I understand. Sweet.
-
Edit:
Yeah that did it. Wow that makes things easy.Last edited by Brenn; June 6th, 2015 at 16:22. Reason: Eureka!
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks