[wxPython-users] Auto Scroll to
Tim Morton
tim at preservedwords.com
Wed Jun 7 13:52:32 PDT 2006
I have done this,
f = open('tmp.htm', "w")
f.write(answer)
f.close()
self.TextBox.LoadPage('tmp.htm#line')
and the page will load but not scroll. Here is the anchor in the page.
<a name="line">...text...</a>
For some reason it won't scroll, but only show the top of the page.
Thanks,
Tim
----- Original Message -----
From: "Dj Gilcrease" <digitalxero at gmail.com>
To: <wxPython-users at lists.wxwidgets.org>
Sent: Wednesday, June 07, 2006 3:11 PM
Subject: Re: [wxPython-users] Auto Scroll to
> If you have to use .SetPage(text) you should be able to write that
> text to a file then use LoadPage
>
> eg.
> f = open(os.cwd() + '/tmp.html', "w")
> f.write(text)
> f.close()
>
> htmlwnd.LoadPage(os.cwd() + '/tmp.html#line_X')
>
> On 6/7/06, Tim Morton <tim at preservedwords.com> wrote:
>> I must use .SetPage(text) to display the html and I can't an anchor to
>> work
>> with it.
>>
>> Thanks,
>> Tim
>>
>>
>> ----- Original Message -----
>> From: "Josiah Carlson" <jcarlson at uci.edu>
>> To: "Tim Morton" <tim at preservedwords.com>;
>> <wxPython-users at lists.wxwidgets.org>
>> Sent: Wednesday, June 07, 2006 12:03 PM
>> Subject: Re: [wxPython-users] Auto Scroll to
>>
>>
>> >
>> > "Tim Morton" <tim at preservedwords.com> wrote:
>> >> I use a search method to find and mark a line in a chapter of text and
>> >> display it in an html window, but when the window opens the marked or
>> >> flagged text is often not visable and must be manually scrolled to be
>> >> visable.
>> >>
>> >> I need to have the html window page auto scroll until the desired line
>> >> is visable. I can have the page scroll to an arbitrary line with
>> >> ".Scroll(0, 10)", but I don't know how to have it scroll automatically
>> >> to a flagged or marked line.
>> >
>> > If you insert some <a name="line_X"></a> tags in there, and you know
>> > all
>> > available lines, you can scroll to the largest previous line available
>> > by using .LoadPage(file/url + '#line_X').
>> >
>> > - Josiah
>> >
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: wxPython-users-unsubscribe at lists.wxwidgets.org
>> > For additional commands, e-mail:
>> > wxPython-users-help at lists.wxwidgets.org
>> >
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: wxPython-users-unsubscribe at lists.wxwidgets.org
>> For additional commands, e-mail: wxPython-users-help at lists.wxwidgets.org
>>
>>
>
>
> --
> Dj Gilcrease
> OpenRPG Developer
> ~~http://www.openrpg.com
> OpenRPG++ Lead Developer
> ~~http://www.digitalxero.net
> XeroWiki Creator
> ~~http://www.digitalxero.net
> Web Admin for Thewarcouncil.us
> ~~http://www.thewarcouncil.us
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: wxPython-users-unsubscribe at lists.wxwidgets.org
> For additional commands, e-mail: wxPython-users-help at lists.wxwidgets.org
>
More information about the wxpython-users
mailing list