on 04-15-2006 6:33 AM
Hi all,
I have to display five different images in five rows of a table.For this purpose i am trying to create a node element with value attribute.How can i set an image to the
node.If it is possible to set an image to the node then i can bind it dynamically to the table.Is it correct way?
Otherwise give me guidance to solve this problem.
Thanks&Regards
Satyam
Designtime:
Context:
Value node "Rows" (cardinality 0:N)
Attribute "ImageURL": string
UI elements:
Table.dataSource = "Rows".
TableColumn, table cell editor = Image
Image.source = "Rows.ImageURL"
Runtime:
for (int i = 0; i < 5; ++i)
{
IRowsElement row = wdContext.nodeRows().createRowsElement();
wdContext.nodeRows().addElement(row);
row.setImageURL(<URL of image at index i>);
}
If you put the image files inside folder src/mimes/components/<name-of-component>, you can use the filename as URL.
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hai Maruti,
You are trying to place as Images.
Simply create attribute in table node, bind that attribute to ImageSrc .
Copy all the images mime--components.image1,images,image3....
for(int i=0;i<size;i++){
IPrivateXXView.ITableElement ele=wdContext.createElement();
ele.setImageSource("image"+i);
wdContext.nodeTable().addElement(ele);
}
Regards,
Naga
User | Count |
---|---|
83 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.