Is there a way to preserve positions of widgets in HTMLFlow when using browser window pop-ups?
The flow for the example below:
1. Create HTMLFLow and add several isc.Img to it, each image with specified top and left positions.
2. Call getPrintHTML() on this HTMLFlow
3. Send the html from getPrintHTML() to a browser pop-up.
All images are shown in the pop-up aligned vertically, top/left values formatting is getting lost.
Similar code with HLayout preserves horizontal formatting of the Layout itself. But is there a way to preserve the exact top/left alignment without routing this html via a server call?
SmartClient_v83p_2013-03-11_Pro
Firefox, IE, Chrome.
thanks.
The flow for the example below:
1. Create HTMLFLow and add several isc.Img to it, each image with specified top and left positions.
2. Call getPrintHTML() on this HTMLFlow
3. Send the html from getPrintHTML() to a browser pop-up.
All images are shown in the pop-up aligned vertically, top/left values formatting is getting lost.
Similar code with HLayout preserves horizontal formatting of the Layout itself. But is there a way to preserve the exact top/left alignment without routing this html via a server call?
Code:
isc.HTMLFlow.create({
ID:"positionsLayout",
width:"100%",height:"500",
children:[
pageImg
]
})
isc.Window.create({
ID:"pageW",title:"Page",
width:680,height:560,autoCenter:true,isModal:false,showModalMask:true,canDragResize:true,items:[
positionsLayout,
isc.HLayout.create({
membersMargin:5,
members:[
isc.IButton.create({title:"New Window",icon:"check.png",width:120,click:"openWin()"})
]
})
]
});
// the call to open this window:
function show(){
pageW.show();
for(i=0; i<arrImgs.length; i++){ //arrImgs is an array of images
isc.Img.create({
ID:"pageImg_"+i,
left:arrImgs[i].left+150,
top:arrImgs[i].top+10,
height:arrImgs[i].height,
width:arrImgs[i].width,
src:arrImgs[i].path
});
positionsLayout.addChild(eval("pageImg_"+i));
}
}
function openWin(){
positionsLayout.getPrintHTML(null, function(html){
myPageWin=window.open('','','width=1100,height=900');
myPageWin.document.write(html);
myPageWin.focus();
});
}
Firefox, IE, Chrome.
thanks.
Comment