MyGUI: Radio button grouping


03-12-2010 23:21:04

I guess I'm a little slow but I still haven't gotten radio buttons working. Using the LayoutEditor I first just created two radioboxes and set one of them to be default pressed. When running the Test inside LayoutEditor I can click each one and the highlighting works but the unpressed one does not become pressed.

I then tried creating a Window and creating them inside the window. The were truly children of the Window but the same result happened, no changing of pressed condition with either button.

I've just started using MyGUI this week so I'm sure I'm doing something wrong.

Oh, here's a little feedback regarding your demo code. Its produces nice demos but the code is overly complicated. I'm sure it made the developer's life simple by creating complicated base classes for multiple demos but its hell on new comers trying to figure out how to do the simplest things with your API. I'm not new to C++ and thank God for that or I would have had to give up. You need very short and very basic "here's how you create buttons and add handlers" for each widget. Yes I know about the Quickstart and it is helpful but you need to show how to "wire up" all widgets.

EDIT: Well I still don't have grouping working but I have a work around which manually turns one button off and the other on (assuming two radio buttons) depending on which one was clicked. Basically doing grouping manually.



04-12-2010 20:33:51

Well, looks like you solved everything yourself. Just confirming - yes, you should set button state yourself through mouse click event. And there's no such functionality as radio button's grouping in MyGUI, so you should manage grouping manually.


07-12-2010 04:54:39

Ah, ok thanks! I have another question but I'll ask it in another forum.