Hi,

I see strange behaviour with a multiline Textfield set to
-readonly and autoscroll for use as a debug-out window.

After writing more lines then can be seen at once the
scrollbar becomes active. Now when scolling up to see the
beginning of the output the lines which then scroll in at
the top of the controll show up totally cluttered. Also
when scrolling down again afterwards the effects on the
lines which scrolled in are the same. 
What I've realized is, when resizing the window - the 
output is being repainted and therefor show up correctly.

I tried leaving out several settings but the only thing
which solves this issue is removing the readonly-flag..

Im running on XP-prof with activestate perl v5.8.3 and 
GUI ver. 1.0 I have seen this also on the previous version
of GUI.

Is there anything I'm missing here or am I going a wrong
approach with this one?

Any hints would be very appreciated.. :-)

greetinx
Dominik


this is how the debug-window is implemented at the moment:

$DbgWin = new Win32::GUI::Window(
        -title  => "DebugOutput",
        -name   => "DbgWin",
        -left   => 450, 
        -top            => 100,
        -width  => 500, 
        -height         => 300,
        -toolwindow => 1,
        -sizable        => 1,
        -resizable      => 1,
        -parent         => $Main,
);

$DbgFont = new Win32::GUI::Font(
        -name   => "Fixedsys",
        -size   => 10,
);

$DbgOut = $DbgWin->AddTextfield(
        -name           => "DbgOut",
        -font           => $DbgFont,
        -multiline              => 1,
        -vscroll                => 1,
        -hscroll                => 1,
        -autohscroll    => 1,
        -autovscroll    => 1,
        -left           => 0,
        -top                    => 0,
        -width          => $DbgWin->ScaleWidth,
        -height                 => $DbgWin->ScaleHeight,
#       -background     => [ 212, 208, 200],
        -readonly               => 1,
);


sub DbgWin_Resize {
print "DbgWin_Resize \n";
        $DbgOut->Resize($DbgWin->ScaleWidth(),$DbgWin->ScaleHeight());
        return 1;
}

sub debug {
        my $dbg = "\r\n";
        $dbg .= shift;
        $DbgOut->Append($dbg);
        return 1;
}




Reply via email to