I am trying to replace a SectionHeader for a SectionStack. However, no matter what I try, I cannot get it to work. Here’s my latest attempt:
// Define the ImgSectionHeader
isc.ImgSectionHeader.changeDefaults("backgroundDefaults",
{
backgroundColor:"#b0b0b0"
}
);
// My Header class
isc.defineClass("MySectionHeader",isc.ImgSectionHeader).addProperties({
initWidget:function(){
this.Super("initWidget",arguments);
this.control = isc.PortfolioSectionHeader;
},
draw:function(){
this.Super("draw",arguments);
this.control.draw();
}
});
// HTML for the header
isc.HTMLFlow.create({
ID: "PortfolioSectionHeader",
height:1000, width:1000, left:50, top:150, autoDraw:false,
contents: "<table border='1' ><tr><td align='left'><img src='images/pieces/16/i15.png'>My Portfolio</img></td><td align='right'><img src='images/pieces/16/i5.png'> <img src='images/pieces/16/i100.png'><img src='images/pieces/16/i101.png'></td></tr></table>"
});
isc.defineClass("MyStack",isc.SectionStack);
// Associating with the MySectionHeader
isc.MyStack.sectionHeaderClass="MySectionHeader";
// Creating the Stack itself
isc.SectionStack.create({
ID: "MyStack",
visibilityMode: "multiple",
width: 950, height: 300, left:150, top:160,
border:"1px solid blue",
// sectionHeaderClass: MySectionHeader,
sections: [
{title: "My Work Portfolio", expanded: true,
//baseStyle:"cell",
items: [
isc.ListGrid.create({
ID: "WorkPortfolio",
// width:650, height:200, left:50, top:50,
alternateRecordStyles:true, showAllRecords:true,
data: myportfolioData, autoDraw:true, //showHeader:true,
fields:[
{name:"ItemName", title:"Item Name", width:"65%"},
{name:"ItemID", title:"Item ID", width:"15%"}
]
})
]},
{title: "My Messages", expanded: true, items: [
isc.ListGrid.create({
ID: "Messages",
// width:650, height:200, left:150, top:150,
alternateRecordStyles:true, showAllRecords:true,
data: mymessages, autoDraw:true,
fields:[
{name:"From", title:"From", width:"40%"},
{name:"ItemID", title:"Item ID", width:"15%"},
{name:"Message", title:"Message", width:"30%"},
]
})
]}
The images in the SectionHeader that I defined are not visible. Any help is greatly appreciated. thanks.