I'm having a bit of trouble with my window at the moment... I'm trying to make it a look a biter nicer, because the png image is only exactly as large as the equation, so there is no 'border' around the equation, making it hard to read sometimes.
I thought I could simply use another ImageElement beneath the equation image, pure white, which was a bit bigger than the equation ImageElement. And while I'm at it (I thought), I can also add a third ImageElement, completely black, exactly 1 pixel offset form the white image (and two pixels larger), making it appear like a small black border.
The XML is this:
xml code:
<Interfaces xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Window Id="EquationWindow" Version="1">
<Attributes>
<Caption>LaTeX</Caption>
</Attributes>
<TitleBar>
<Title>
<Text>LaTeX</Text>
</Title>
</TitleBar>
<Position Width="200" Height="160">
<IsAbsolute>true</IsAbsolute>
<Resizable Allowed="BothSides">
<MinWidth>200</MinWidth>
<MinHeight>160</MinHeight>
</Resizable>
</Position>
<DialogTmpl>
<BottomBar Style="Plain">
<RightControls>
<Control xsi:type="ButtonControl" Id="BtnCancel">
<Position Left="0" Top="0" Width="50"/>
<Caption>Close</Caption>
</Control>
</RightControls>
</BottomBar>
</DialogTmpl>
<Elements>
<Element xsi:type="ImageElement" Id="BlackBG">
<Position Left="4" Top="4" Width="192" Height="122">
<IsAbsolute>true</IsAbsolute>
<Anchor Horizontal="LeftRightFixed" Vertical="TopBottomFixed"/>
</Position>
<Image>
<Name>blackBG</Name>
<Mosaic>ResizeToFit</Mosaic>
</Image>
</Element>
<Element xsi:type="ImageElement" Id="WhiteBG">
<Position Left="5" Top="5" Width="190" Height="120">
<IsAbsolute>true</IsAbsolute>
<Anchor Horizontal="LeftRightFixed" Vertical="TopBottomFixed"/>
</Position>
<Image>
<Name>whiteBG</Name>
<Mosaic>ResizeToFit</Mosaic>
</Image>
</Element>
<Element xsi:type="ImageElement" Id="EquationImage">
<Position Left="8" Top="8" Width="184" Height="114">
<IsAbsolute>true</IsAbsolute>
<Anchor Horizontal="LeftRightFixed" Vertical="TopBottomFixed"/>
</Position>
<Image>
<Name>loading</Name>
</Image>
</Element>
</Elements>
</Window>
</Interfaces>
And the window, when using the Interface Tester, looks like this:
I'm noticing a few things:
1. The black and white images appear to be exactly the size I saved them in. Shouldn't the <Mosaic>ResizeToFit</Mosaic> tag make sure they are stretched, so they fill the window as I tell them?
2. The window is not resizable at all, even though I tell it too. Maybe this is just not possible in the Interface Tester? I've no idea...
3. The black border on the left is two pixels instead of one, indicating that the white image is actually two pixels offset from the black one, even though I'm telling it to be only one pixel apart.
4. When I run my script, the window looks like this:
Where has everything gone??