PDA

View Full Version : Quick window question



Stv
June 10th, 2020, 20:33
I have created a new windowclass in my xml file as shown below


<root>
<windowclass name="test_window">
<frame>referencelist</frame>
<placement>
<size width="350" height="500" />
</placement>
<sizelimits>
<minimum width="350" height="400" />
<dynamic />
</sizelimits>
<softclose />
<nodelete />
<sheetdata>
<windowtitlebar name="title">
<resource>test title</resource>
</windowtitlebar>
</sheetdata>
</windowclass>
</root>

I'm strugglng to figure out the correct way to display it onscreen.
Basically, I ultimately want to use this window as a wrapper to display some other subwindows.

With that i mind, as well as displaying this window 'as is', is there anything I should be aware/wary off with what I have in mind?

Cheers, Steve.

Moon Wizard
June 10th, 2020, 21:38
You need to decide how you want to trigger this window to appear. The sidebar buttons are basically "links" to open specific windows with specific data sources. There are also APIs to open windows, but usually those are triggered off actions of some sort by the user. The only windows that are always available are the panels; and require a panel definition as well as the windowclass definition. (Look at "chat", "modifierstack", "characterlist", etc.)

Regards,
JPG

Stv
June 10th, 2020, 21:44
The window is to open when a button is pressed. I have the button setup, so have access to the button status, but wanted to make sure the way I was triggering the window was correct.
I tried with Interface.OpenWindow, but wasn't sure if that is the correct/preffered way of doing this.

Cheers, Steve.

Moon Wizard
June 10th, 2020, 21:50
Yes, that's the correct method. It's essentially what link controls call when they are pressed. (i.e. windowreferencecontrol)

Regards,
JPG

Stv
June 10th, 2020, 22:07
Awesome, thanks for the help.

Cheers, Steve.