I'm outputting something to the textfield I created using Win32::GUI, like this:
$Object->AddTextfield(
-name => "Birthchart",
-left => 75,
-top => 90,
-width => 250,
-height => 250,
-vscroll =>1,
-multiline => 1,
-prompt => "Birthchart",
);
{#do something here....
}
$Object->Birthchart->Append($Content);
The problem is: it automatically takes me to the end of the output but I want to read the output from the beginning without having to scroll up. It's okay to scroll down later.
I can use the following code
$Object->Birthchart->GetFirstVisibleLine();
to obtain the number of the uppermost visible line, but how can I set the number of the uppermost visible line to 0?
The code $Object->Birthchart->ResetFirstVisibleLine() doesn't work.
Any suggestions? Thanks in advance.
Update
Tried the following code
$Object->Birthchart->ScrollPos(1,0);
But it still doesn't work. The scrollbar seems to be reset but I still have to click on the scrollbar to view the beginning of the textfield content.