Re: Function to return Gtk2::Table



2009/5/15 Peter E Dennis <peter edwin dennis gmail com>:
# Get vbox to hold created tables
$vbox2 = $gladexml->get_widget('vbox2');


you don't have a vbox2 defined in your glade file, so that won't work.
looking at the code, since you are packing $vbox2 into $vbox1, perhaps
you meant to create a new vbox?
try something like this:

$vbox2 = Gtk2::VBox->new();

note that I haven't looked very much at this, tho this appears to at
least run.

When I run the program, the window is too large for the screen's
width.  I have tried shrinking the containers and widgets as per:

# Show the widgets
$vbox2->pack_start($table, FALSE, FALSE, 0);
$vbox2->show_all;
$vbox1->pack_start($vbox2, FALSE, FALSE, 0);
$vbox1->show_all;


    # Layout title row
    $table->attach($lbl_num, 0, 1, 0, 1, 'shrink', 'fill', 0, 0);
    $table->attach($tcol_sep1, 1, 2, 0, 1, 'shrink', 'fill', 0, 0);
    $table->attach($lbl_time, 2, 3, 0, 1, 'shrink', 'fill', 0, 0);
    $table->attach($tcol_sep2, 3, 4, 0, 1, 'shrink', 'fill', 0, 0);
    $table->attach($lbl_objectives, 4, 5, 0, 1, 'shrink', 'fill', 0, 0);
    $table->attach($tcol_sep3, 5, 6, 0, 1, 'shrink', 'fill', 0, 0);
    $table->attach($lbl_tasks, 6, 7, 0, 1, 'shrink', 'fill', 0, 0);
    $table->attach($tcol_sep4, 7, 8, 0, 1, 'shrink', 'fill', 0, 0);
    $table->attach($lbl_resources, 8, 9, 0, 1, 'shrink', 'fill', 0, 0);

But still the window is too wide.

Is this the correct way to make widgets not expand horizontally?



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]