Hey friends,
I'm trying a News Widget and my question is how to make a GridCell.
I have a class called FutbolView.js which work it, but I want to include a GridCell for put 5 or 6 News from top to bottom.
So far I managed to screen out anything that is not a backbutton, a header and a disabledbutton, as the page indicator associated with the grid also missing.
I would show all you my code. If someone could help me I will be very grateful
It have a var titular which have the holder of the new by XML.
CODE
this.controls.grid = new KONtx.control.Grid({
id: 'contenedorCeldas',
rows: this.config.rows,
columns: this.config.columns,
styles: {
width: this.width,
height: this.height - this.controls.backbutton.height -
this.controls.disabledButton.height - this.controls.pageindicator.height,
vOffset: this.controls.backbutton.height + this.controls.disabledButton.height,
},
cellCreator: this.imageCellCreator,
cellUpdater: this.imageCellUpdater,
}).appendTo(this)/* Grid */
//this.controls.grid.attachAccesories(this.controls.pageindicator);
imageCellCreator: function(){
var cell = new KONtx.control.GridCell({
events: {
onSelect: function (event){
KONtx.application.loadView("view-DetalleConciertos");
}
}
});
log("var cell creada");
cell.foto = new KONtx.element.Image({
src: "Images/960x540/Basketball.png",
styles: {
vAlign:"center",
hAlign:"center",
height: 46,
width: 46,
vOffset: 12
}
}).appendTo(cell);
cell.nombre = new KONtx.element.Text({
styles: {
color: 'white',
fontSize: '16px',
hOffset: 57,
vOffset: 11,
}
}).appendTo(cell);
log("cell.nombre creado");
},
imageCellUpdater: function(){
cell.nombre.data = titular;
},
A lot of thanks