Text with radio button widget

Hi,

Is there a way to attach a text with a radio button widget ? I did not find any API to do so. Its pretty common to display radio button with an associated text.

Of course, I could create a text and add it on the side, but if the user touch the text, nothing would happen. I would have to add an event handler, which is very cumbersome.
 

Any things I am missing ?

thanks any help provided

I hear what you’re saying and I would love to have that option in the widget but I believe in its current incarnation this feature does not exist. The idea you have is the best way to do this for now I suppose.

Edit : another idea could be to supply the radio button widget some custom graphics and include the text in there. Didn’t try this but think it should work.

It should work, but including the test as a graphics is not very efficient or practical with localization.

We are currently investigating to override the switch class and provide a label, font and font size as well as position. I will keep you inform.

I agree. Text as part of the graphic is not practical at all. Good idea extending the existing widget code. It should not be too hard to do this. Maybe we can even convince Alex to take a shot! :wink:

If Alex did this, he would be just creating a display.newText() under the hood and drawing it for you.  Sure that would be a convenience feature, but since calling display.newText() isn’t that hard and there are other things that need fixed, I wouldn’t think this would be a high priority addition.

Rob

I hear what you’re saying and I would love to have that option in the widget but I believe in its current incarnation this feature does not exist. The idea you have is the best way to do this for now I suppose.

Edit : another idea could be to supply the radio button widget some custom graphics and include the text in there. Didn’t try this but think it should work.

It should work, but including the test as a graphics is not very efficient or practical with localization.

We are currently investigating to override the switch class and provide a label, font and font size as well as position. I will keep you inform.

I agree. Text as part of the graphic is not practical at all. Good idea extending the existing widget code. It should not be too hard to do this. Maybe we can even convince Alex to take a shot! :wink:

If Alex did this, he would be just creating a display.newText() under the hood and drawing it for you.  Sure that would be a convenience feature, but since calling display.newText() isn’t that hard and there are other things that need fixed, I wouldn’t think this would be a high priority addition.

Rob