A simple Component::tag (setTag() / getTag() ) request

Hi Jules,

It would be nice to have a generic Tag member for every component so we could use that for arbitrary purpose (I call it Tag, because Borland VCL comes to mind, sorry :)). Integer, like in VCL or double is fine, but JUCE’s String is so powerful that it’s probably the best bet.

What I’m stuck with right now is custom-drawn toggle buttons. They would be so easy to use as sort of LEDs with labels and I could use this Tag member to specify colour.


get/setComponentProperty is probably what you are looking for ?

I also think it would be good to have such functions. The component property functions are good, but slow.

It is often very useful to assign an integer tag to a component and to be able to retrieve it directly without spending too much CPU cycles on that.

Oh, boy! How could I have missed this? JUCE is full of (pleasant) surprises. Thanks!