Hi,
lblname is still a string in your example, so it isn't a label - it's equal
to its name though. So what you can do:
if you have 20 labels (or whatever number) you can unite them in an array of
labels. You could refer to them somehow like this: labelArray[c_gennum]

For this, please check out this article:
http://code.google.com/apis/desktop/articles/e1.html



On Thu, Jul 2, 2009 at 6:00 PM, ajaykarthick <[email protected]>wrote:

>
> HI i am trying to change the color property of labels dynamically at
> run time
>
> this is my code snippet in which i am working on
>
> var lblname='label'+String(c_gennum);
> lblname.color="#C51515";
>
> gadget.debug.trace(lblname+" "+lblname.color);
>
> where my c_gennum is some random number between 1-20 i have 20 labels
> with name as label1,label2....
>
> instead of setting the color property of all labels like
> label1.color=..label2.color= i had done as coded above
>
> my debug trace result shows
>
> lblname=label1,label2.....
> lblname.color=undefined
>
> i have no change in the color of label there in the gadget, is there
> anything wrong in my code?
> how do i change the property of it at run time? please give me other
> ideas to do so !
>
> Regards
> AjayKarthick S
> >
>


-- 
Teo (a.k.a. Teominator a.k.a. Teodor Filimon)
site www.teodorfilimon.com | blog www.teodorfilimon.blogspot.com
GMT +2

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Desktop Developer Group" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/Google-Desktop-Developer?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to