cancel
Showing results for 
Search instead for 
Did you mean: 

FlexButton with the Radio Button capability

PSpectrum
Associate

Would it be possible to add the Radio Button capability to the Flexbutton? 

5 REPLIES 5
LouisB
ST Employee

Hello @PSpectrum,

It's supported by changing the trigger type to "toggle", please refer to the documentation Flex Button | TouchGFX Documentation.
There's also an example showing that.

Best regards,

Louis BOUDO
ST Software Developer | TouchGFX

@LouisB, I think PSpectrum means to add FlexButtons to radio groups.

Just tried it now.
I can't "RadioButtonGroup::add()" using a toggle FlexButton.

Marc_LM
Associate III

@GaetanGodart, could I suggest to add a radio "trigger" in FlexButtons?
That way it could be managed by the base class generator.


Hello @Marc_LM ,

 

I don't think that adding a radio trigger to the flexButton would be a good thing.

The flexButton is meant to be use as a standard button but with a more customizable appearance while the radio button has to have 4 different images and each radio button is linked to another.

When changing the trigger type of a flexButton, the number of images on the "icon" visual element is always 2 but it should be 4 for a flexButton with radio trigger and then it should also "be linked" to the other "normal" radio buttons so I don't think this is something that we will implement.

 

Do you have a specific case where you need a flexButton and a radioButton as one button?
Maybe we can try to find a solution together with custom code for that specific use.

 

Regards,

Gaetan Godart
Software engineer at ST (TouchGFX)

I don't have that issue on my end because the current style I use; Pressing is equivalent to Selected.
But I do see the point that full implementation would require *RadioStyle for Text, Image and Icons.

I added my modifications to the library here for posterity.

""
Do you have a specific case where you need a flexButton and a radioButton as one button?
""
I need a radio button with text.

(I can't see the zipfiles I attached)