on 01-23-2008 8:41 AM
Hello,
I need to implement ICONs on a table. I am using a data structure for the table; so what should be the Type i need to specify for the Icon Column?. Please help me by providing simple examples or links...
Thanks
Vinod V
[Helps will be rewarded!]
Hi Vinod
First copy all your images into "project/src/mimes/components/<packagename>"
1) First create a new column for image and insert Child "Image" UI Element
2) Create a Context in a view in which you are using Image UI Element
3) Value Node
Name : Image
Cardidality : 1..1
4) create 2 Value Attributes
4)a ImageAlt (Calculate property - true)
4)b ImageSrc (Calculate property - true)
5)Bind the properties of Image
alt - Image.ImageAlt
source - Image.ImageSrc
6) in getImageSrc()
{
//according to your condition use your image
retrun "XX.gif"
}
7) in getImageAlt()
{
return "Image Not Available"
}
Case 2 :
1) Add a new String attribute to your existing context
2) Right click on your table in RootUIElememntContainer
3) Edit Sturcture Binding
4) Select the context which you modified , Select next
5) in the next step for the newly created attribute select imageUIElement as type
If you want to use that in wdDoinit()
bind the two string value attributes to alt and source properties of ImageUIElement and write the following code
in doinit
wdContext.currentContextElement.set<src>("img1.gif") ;
wdContext.currentContextElement.set<alt>("Image not found") ;
Best Regards
Chaitanya.A
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.