Closed MaxPerl closed 7 years ago
Hi Max,
I've fixed the frameSizes bug, thank you. Sorry this file one of few I did not author.
As for the other problem, I suggest not using pack but growMode instead:
use strict;
use warnings;
use Prima qw(Application FrameSet Label);
# F├╝ge dem Program ein Icon hinzu
#my $icon = Prima::Icon->load('camel.png');
#$::application->icon($icon);
# Erstelle das HauptFenster
my $mw = Prima::MainWindow->new(
size => [300, 200],
text => 'Grid example');
my $fs = Prima::FrameSet->create(
owner => $mw,
size => [300, 200],
arrangement => fra::Vertical,
pack => {expand => 1, fill => 'both'}
);
my $label = $fs->insert_to_frame(
1,
'Label',
text => 'This is top',
origin => [0,0],
growMode => gm::Client,
);
$label->size( $label->owner->size);
my $label2 = $fs->insert_to_frame(
0,
'Label',
text => 'This is bottom',
origin => [0,0],
growMode => gm::Client,
);
$label2->size( $label2->owner->size);
run Prima;
Dear Dmitry, Thank you for your help. Damage that pack doesn't work in Prima::FrameSet. The pack geometry manager is for me much more familiar and easier to handle. But I see, I need to learn the growMode geometry manager...
Hi Max,
I'm pretty sure the problem you're experience with pack is either a bug or the code is missing some extra call that is not evident/documented, and I intend to have a look at it. Meanwhile, to not block your progress, I suggest to use growMode until I figure out what's wrong with pack.
Dmitry
All right, that was easy. FrameSet was conceived before pack was introduced to Prima, that's why. I think this is fixed now.
Dear Dimitry, You are fantastic. Everything is fine now. Thank you so much! Nevertheless I have to learn the growMode geometry manager ;-)
you're welcome ;)
Dear Dimitry, Sorry for posting so much bug reports, but I noticed again a little problem in Linux and Windows.
The following frameset code causes grey noise in Windows and Linux. After Resizing the main window the labels and framesets are shown correctely:
Furthermore when frameSize in the Prima::Frameset->create method is not set, I get the following error:
But perhaps this is normal?