Square radio buttons?

342 views
Skip to first unread message

Justin Robinson

unread,
Jan 30, 2012, 10:24:17 AM1/30/12
to BigBlueButton-dev
Hi everybody,

I'm trying to add radio buttons to the Polling Module, but for some
reason they keep coming out as rounded rectangles instead of circles.
I can't find anywhere in the code that specifies this shape, and can't
find evidence online that there's even a WAY to specify this shape.
Has anyone else run into this?

-Justin

Chad Pilkey

unread,
Feb 7, 2012, 12:15:07 PM2/7/12
to BigBlueButton-dev
Just to expand on the RadioButton problem. The default appearance and
skin for RadioButtons is the same as a Button. For example if you add
a label to a RadioButton it places it inside the rounded rectangle
rather then to the side of it.

I've been trying to alter the style of the RadioButton, but every
attempt I make just results in the function not being run.

The code that I'm using to try and reskin the RadioButton is as
follows:
> import mx.core.FlexGlobals;
> [Embed(source="../assets/skin.swf", symbol="upIcon")]
> public var rbup:Class;
> private function init():void {
> FlexGlobals.topLevelApplication.styleManager.getStyleDeclaration("RadioButton").setStyle("upIcon", rbup);
> }

My init() function won't run, but if I change the "RadioButton" in the
second last line to "CheckBox" the skin of a CheckBox is correctly
displayed as my new image. "upIcon" is supposed to be a valid property
of both CheckBoxes and RadioButtons so the line should alter the two
the same.

I've also tried changing the "color" property of RadioButtons to
"Red," but that doesn't even work. The color change works correctly
with CheckBoxes. I figured "color" would work with RadioButtons
because they are drawing the same as Buttons so I figured they'd at
least have a color property.

The equivalent property for Buttons of the "upIcon" property is the
"upSkin" property which I tried to change as well for RadioButtons,
but that doesn't work either.

This RadioButton problem has me very confused.

-Chad

Chad Pilkey

unread,
Feb 7, 2012, 1:01:10 PM2/7/12
to BigBlueButton-dev
I did some more digging into what might be the cause of the display
issue and I think I've found the culprit.

I added three lines into my previous init() function:
> LogUtil.debug(LOGNAME + "Style Declarations");
> LogUtil.debug(LOGNAME + FlexGlobals.topLevelApplication.styleManager.getStyleDeclaration("CheckBox"));
> LogUtil.debug(LOGNAME + FlexGlobals.topLevelApplication.styleManager.getStyleDeclaration("RadioButton"));

I figured I'd just see what sort of objects we're dealing with to see
if it would give me any clues. The output in the log was quite
interesting.
> [DEBUG] [PollingInstructionsWindow] [object CSSStyleDeclaration]
> [DEBUG] [PollingInstructionsWindow] Style Declarations
> [DEBUG] [PollingInstructionsWindow] null

It appears that RadioButtons appearance has never actually been
initialized with anything. That's why they're appearing as Buttons,
because the program is just making its best guess.

I don't really know how to go about fixing this issue though because I
haven't figured out where the CSSStyleDeclaration object is created.

-Chad

Chad Pilkey

unread,
Feb 7, 2012, 1:15:41 PM2/7/12
to BigBlueButton-dev
I looked through more files and I think the ultimate issue is with
linker-report.xml. There's no entries for RadioButton objects. I don't
know anything beyond that, but I think the ultimate cause of the issue
is there.

Sorry for the multiple posts.

-Chad
Reply all
Reply to author
Forward
0 new messages