Shoutbox

[?] Resizing a child window - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: Scripting (/forumdisplay.php?fid=39)
+----- Thread: [?] Resizing a child window (/showthread.php?tid=65538)

[?] Resizing a child window by Matti on 08-29-2006 at 03:43 PM

Okay, as I now want to extend the GUI of Countdown Live, I would like to let the user resize the preferences window. Therefore, the child windows have to resize too... but they don't. This is what the XML looks like:

code:
In <Window Id="WndOptions">:
...
<Position Width="400" Height="275">
   <Resizeable Allowed="BothSides">
      <MinWidth>400</MinWidth>
      <MinHeight>275</MinHeight>
   </Resizeable>
</Position>
...
code:
In <Window Id="WndSettings">:
...
<ChildTmpl/>
<Position Width="291" Height="218">
   <Resizeable Allowed="BothSides">
      <MinWidth>291</MinWidth>
      <MinHeight>218</MinHeight>
   </Resizeable>
</Position>
...
<Elements>
   <Element xsi:type="FigureElement" Id="FigExample">
      <Position Top="88" Left="5" Height="40" Width="281">
         <Anchor Horizontal="LeftRightFixed" Vertical="BottomFixed"/>
      </Position>
      <Figure>
         <RoundRect><Radius>3</Radius></RoundRect>
      </Figure>
      <Border>
         <Color><GlobalColor>bg</GlobalColor></Color>
      </Border>
      <Fill>
         <PlainColor>
            <Red>255</Red>
            <Green>255</Green>
            <Blue>255</Blue>
            <Alpha>120</Alpha>
         </PlainColor>
      </Fill>
   </Element>
</Elements>
...
And this is how the result looks like:
[Image: attachment.php?pid=721115]
*containg = containing

For the full code, look on PasteBin.

Any ideas how to fix this?
RE: [?] Resizing a child window by Matti on 08-29-2006 at 06:41 PM

[BUMP!]
Does anyone know? I really would like to let the user resize the window :(


RE: [?] Resizing a child window by Jimbo on 08-29-2006 at 06:49 PM

I think your code is the only way to do it,
if it doesn't work then i can't think of another way of doing it.
* Jimbo thinks that maybe more advanced scripters will be able to help you


RE: [?] Resizing a child window by Matti on 08-29-2006 at 07:13 PM

Damn, that's exactly what I thought. :(
It seems like my script doesn't want to work... could it be me? :P

Any ideas are more than welcome! :)


RE: [?] Resizing a child window by markee on 08-29-2006 at 09:51 PM

In the XML where you are defining the size of the window (under "<ChildTmpl/>") you have width and height (this resizes the child window for you), just add left and top there and it will move the window into the position you want so it looks centred in the parent window, I am quite sure.  Sorry for not being overly confident on this one but I usually get Jay_Jay to do my windows :P and I don't have the scripting documentation at uni.  Have a look in the XML schema thing there (the bottom one all the way through) and if you have a look at the different adjustments you can make and compare them to what you have in your XML you should start to notice patterns and understand how the schema documentation is set out for future reference (don't worry it took me a while to understand too :P)


RE: [?] Resizing a child window by Matti on 08-30-2006 at 08:10 AM

quote:
Originally posted by markee
In the XML where you are defining the size of the window (under "<ChildTmpl/>") you have width and height (this resizes the child window for you), just add left and top there and it will move the window into the position you want so it looks centred in the parent window, I am quite sure.  Sorry for not being overly confident on this one but I usually get Jay_Jay to do my windows :P and I don't have the scripting documentation at uni.  Have a look in the XML schema thing there (the bottom one all the way through) and if you have a look at the different adjustments you can make and compare them to what you have in your XML you should start to notice patterns and understand how the schema documentation is set out for future reference (don't worry it took me a while to understand too :P)
I don't want to place the whole child window in the center, but I want to anchor the elemens in the child to the sides of the parent. And therefore, I have to let the child window resize along with the parent. :-/
Anyone has other ideas? :P