PDA

View Full Version : Character Sheet Tab Question



UrsaTeddy
May 27th, 2020, 07:29
Greetings All,

Is it possible to have part of a tab turned on/off on a character sheet tab?

For example just say I did not want to display the Advances box, can I create an option that will turn it on/off?

Or do I have to swap in a new tab for the original tab?

Hence if I wanted more than one section on/off, would I have to create multiple versions of the tab and switch it in and out or can I just have them be visible/invisible?

damned
May 27th, 2020, 08:02
You can use
XXXX.setVisible(false);
to set XXXX as invisible

UrsaTeddy
May 27th, 2020, 10:17
You can use
XXXX.setVisible(false);
to set XXXX as invisible

So if I modified the Notes sheet to have two more regions on it - say Secret Phrases and Some Stuff, I would use SecretPhrases.setVisible(false) to hide it and vice versa.

What happens with anchoring and sizing? Do the left over regions resize? Just stick to their anchors? etc?

damned
May 27th, 2020, 14:03
So if I modified the Notes sheet to have two more regions on it - say Secret Phrases and Some Stuff, I would use SecretPhrases.setVisible(false) to hide it and vice versa.

What happens with anchoring and sizing? Do the left over regions resize? Just stick to their anchors? etc?

What happens to the anchors? well it depends on precisely what you mean.
Dont anchor stuff to things you are going to hide would be my bet.

UrsaTeddy
May 27th, 2020, 16:31
What happens to the anchors? well it depends on precisely what you mean.
Dont anchor stuff to things you are going to hide would be my bet.

Okay, so modifying the Notes tab to add two extra "zones" that hide/show as required would be more difficult than adding another tab - if I understand that response correctly. Since the Notes tab has a text box that fills the tab completely.

Unless you can modify its anchors dynamically and somehow refresh the character sheet or tab.

damned
May 28th, 2020, 01:47
Not necessarily.

If you have
A B C
D E
F

A is anchored to top left of frame (example)
B is anchored to A
C is anchored to B
D and E are anchored to top left of frame with an offset
F is anchored to bottom of D

If you remove B it means C is not anchored
If you remove D it wont effect E but it will effect F

You can just redefine the anchors if you are modifying something existing, or if coding from start, be aware of what will hide/show and anchor around it.

UrsaTeddy
May 28th, 2020, 05:19
Not necessarily.

If you have
A B C
D E
F

A is anchored to top left of frame (example)
B is anchored to A
C is anchored to B
D and E are anchored to top left of frame with an offset
F is anchored to bottom of D

If you remove B it means C is not anchored
If you remove D it wont effect E but it will effect F

You can just redefine the anchors if you are modifying something existing, or if coding from start, be aware of what will hide/show and anchor around it.

Okay, great ... that gives me a lot to test and work out. The /reload option would be so useful in FGU right now :)