Hi,
I turned into a dead end.
I am trying to resolve this in two ways, both did't work for me:
1)
I read:
http://shoutbox.menthix.net/showthread.php?tid=65974&page=1
And then I saw the simplest thing is to do a custom look with no content => the button is invisible.
Then I put an image element at the same spot.
The problem is, the image is bigger than the button.
Then I read:
http://shoutbox.menthix.net/showthread.php?tid=82412&pid=895524
Which talks about the same problem.
However, <MOSAIC> doesnt work, and the problem remains.
Can you help?
Here is the code:
XML :
<Elements>
....
<Element xsi:type="ImageElement" Id="ImgPlay">
<Position Top="10" Left="90" width="10" height="10"/>
<MOSAIC>ResizeToFit</MOSAIC>
<Image><Name>play</Name>
</Image>
<Format>JPG</Format>
</Element>
</Elements>
Js:
Wnd.ImageElmt_SetImageFile('ImgPlay', 'play.jpg');
2)
I tried to do a custom look and insert the picture inside the button:
XML:
<Control xsi:type="ButtonControl" Id="BtnPlay">
<Position Top="10" Width="20" Left="90" Height="20"/>
<Caption>Play</Caption>
<CustomLook>
<Normal>
<Element xsi:type="ImageElement" Id="ImgPlay">
<Position Top="10" Left="90" width="10"
height="10"/>
<MOSAIC>ResizeToFit</MOSAIC>
<Image><Name>play</Name></Image>
<Format>JPG</Format>
</Element>
</Normal>
</CustomLook>
</Control>
JS code:
Wnd.ImageElmt_SetImageFile('ImgPlay', 'play.jpg');
But here I guess there is a problem to set an image, which is inside custom look. This also was discussed earlier, but with no solution.
If the picture size is bigger than the button, I thought I need here also the MOSAIC command. Anyway, its not working.
It doesnt even show the picture (unlke in (1) where it shows the picture, but its size is huge, and doesnt effect by MOSAIC command).
Thanks a lot!