Here is a minimally functional (well, not really, but it runs) example of the code from the linked page I mentioned:
use strict; use warnings; use Prima qw(Application Buttons);
my $window = Prima::MainWindow->new(
text => "Invisible Radios!",
size => [300, 200],
);
my $box = $window->insert( Widget => name => "box", pack => { fill =>
+"both", expand => 1, }, );
# Code straight from http://search.cpan.org/~karasik/Prima-1.41/Prima/
+Buttons.pm
# only change is $box instead of $widget
my $group = $box-> insert( 'Prima::GroupBox',
onRadioClick => sub { print $_[1]-> text, "\n"; }
);
$group-> insert( 'Prima::Radio', text => 'Selection 1');
$group-> insert( 'Prima::Radio', text => 'Selection 2', pressed => 1);
$group-> index(0);
# End of copied code!
Prima->run();
Examining the scripts that do display, I think that the problem is that the example code (and thus, my own) does not contain an origin attribute, without which, it appears the radios do not (properly) display.
Unfortunately, this attribute is not mentioned anywhere on the page documenting buttons that I linked above (or any other documentation I found in my searching). This is quite sad, as it appears to be a required attribute.
Thanks for pointing me in the right direction to figure it out. index(0);
# End of copied code!
Prima- |