PDA

View Full Version : Subwindow



Fenloh
May 14th, 2010, 13:01
Hi again,

I am lost with the subwindows.

As far as i understand it you have a Windowclass, lets call it "testclass"
within the Sheetdata you place a Subwindow


<subwindow name="testsubwindow">
<bounds>0,0,30,18</bounds>
<class>charsheet_windowclass</class>
</subwindow>


How exactly do i call it to the visible status?. It is invisble in its standard. I understood the code of moon, that he calls the window with

"window[testsubwindow].setVisible(true)"

but unfortunatly it does not work for me. I tried to understand it by folowing the way moon has dealt with the Tabtargets.

Fenloh

Zeus
May 14th, 2010, 13:08
How about:




window.testsubwindow.subwindow.setVisible(true);



or just



window.testsubwindow.setVisible(true);


It really depends upon where the calling code is made from.

Fenloh
May 14th, 2010, 13:17
Thanks a lot. I just did not understand the Code from moon regarding the Tabtargets. (sigh)

Fenloh

Moon Wizard
May 14th, 2010, 17:44
Also, there is a tabcontrol built into several of the rulesets (d20, 3.5E, 4E) that will automatically flip between subwindows on the same top level sheet. It automatically makes the first defined subwindow in the tabcontrol visible.

And, you can also use the tag <activate /> to make a subwindow visible right away, if you aren't using the tabcontrol.

Cheers,
JPG