Given a Win32::GUI object, I want to get at the value of an option (eg,
a control's height). How do I do this? For example, given a main window
$main, can I get its width (given that the user may have resized it)?

Second question - can I set a window/control's options (again, width and
height are the obvious examples) in code?

Actually, after a bit of digging, I found $current = $win->Width() and
$win->Width($newval). So it's a documentation issue :-)

Actually, I'd like

    use Win32::GUI;
    $main = new Win32::GUI::Window(-name =>"Main");
    $main->AddLabel(-name => 'Label1', -text => "Hello, world!");
    $main->Height($main->Label1->Height());
    $main->Width($main->Label1->Width());
    $main->Show();
    Win32::GUI::Dialog();
    sub Main_Terminate { -1; }

to work (ie, to dynamically resize the main window based on the text),
but it doesn't. Any chance of that?

Paul.

PS I've really only just started playing with Win32::GUI, and I love it!
Not only is it nice to use, it also seems really fast! (But I just got a
new PC, so maybe it's just the 150MHz vs 366MHz difference :-)

Reply via email to