Hi, Perl monks,
This is the first time I've been here and I'm new to the rules here. Well, I'm asking a question I've already asked at stackoverflow.com. I'm not sure if this is okay and I don't want any duplicate efforts. But my question hasn't been answered there so I'm here anyway.
The situation is this:
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? or just reset the scrollbar to the top position?
The code
$Object->Birthchart->ResetFirstVisibleLine();
doesn't work.
And I also tried the following code
$Object->Birthchart->ScrollPos(1,0);
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.
Any ideas / suggestions? Thanks in advance.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.