PDA

View Full Version : How do I get dumb text in a charsheet subwindow that can be turned off and on?



SilentRuin
August 2nd, 2020, 00:20
I thought first I could just use something like:



<windowclass name="charsheet" merge="join">
...
<sheetdata>
<subwindow name="sub_mystuff">
...
<class>char_mystuff</class>
<activate />
<fastinit />
<invisible />
<disabled />
</subwindow>
</sheetdata>
</windowclass>

<windowclass name="char_mystuff" >
...
<sheetdata>
<label_charframetop name="theAstuff">
...
<static textres="my_text_A" />
<invisible />
</label_charframetop>
<label_charframetop name="theBstuff">
...
<static textres="my_text_B" />
<invisible />
</label_charframetop>
<label_charframetop name="theCstuff">
...
<static textres="my_text_C" />
<invisible />
</label_charframetop>

...
</sheetdata>
</windowclass>



and then turn them on and off at various times with



window.theAstuff.setVisible(true);
.etc


At this point I figured this failed because they are not a control or something. So tried to wrap them in genericcontrol(s) but no luck there either.

So my question is - in a sub window full of controls - how do I place and control DUMB text? It seems to be there. But it is never ever displayed. Unless I'm not in the sub window - then labels work fine.

What do you do here?

Ampersandrew
August 3rd, 2020, 21:26
What size is it? how have you positioned it in the window?

SilentRuin
August 3rd, 2020, 23:30
What size is it? how have you positioned it in the window?

I defined no width or height in the label - just an anchor point off another control. This EXACT subwindow above applied to the NPC sheet works for the label. Applied to the charsheet it does not.

SilentRuin
August 4th, 2020, 16:21
Guess I'll have to trial and error on my own to figure this out.

Ampersandrew
August 4th, 2020, 17:48
I defined no width or height in the label - just an anchor point off another control. This EXACT subwindow above applied to the NPC sheet works for the label. Applied to the charsheet it does not.

Try defining a width and see if it shows up.

SilentRuin
August 6th, 2020, 23:03
Try defining a width and see if it shows up.

I don't know what I was doing wrong - but starting from scratch on these labels and everything is now working. My own stupidity at doing something bizarre I guess - then when starting at it fresh - worked. Not sure what I was doing wrong first time but I'm betting you were right and it had something to do with not giving height and width. Lesson learned, labels get a height and width always from now on.