comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: scroll problem with widget_text
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: scroll problem with widget_text [message #56667] Wed, 07 November 2007 09:01
ben.bighair is currently offline  ben.bighair
Messages: 221
Registered: April 2007
Senior Member
On Nov 7, 11:39 am, David Fanning <n...@dfanning.com> wrote:
> ben.bighair writes:
>> Note that this is a line number, not a character offset.
>
> Which is sort of *exactly* the problem with it. :-(
>
> To get a new line, you have to type a CR, but most
> users don't. They just type away, and then the line
> scrolls automatically. It is *exceedingly* difficult
> to handle this situation in a consistent way. I've
> had to write my own "text breaking" code to be sure
> I could find line numbers as the user typed.
>

Oh. I just hate it when users get involved. It really screws up
perfectly good software.

This is pretty revealing though. I have lots of code that allow users
to take notes - I never
bump into this problem when I use the stuff because I tend to be a
little note-taker. This goes to show you that probably nobody uses my
code. Uhoh, this could be bad for the ol' self-esteem.

Let's not think about that.

Cheers,
Ben
Re: scroll problem with widget_text [message #56668 is a reply to message #56667] Wed, 07 November 2007 08:39 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
ben.bighair writes:

> Note that this is a line number, not a character offset.

Which is sort of *exactly* the problem with it. :-(

To get a new line, you have to type a CR, but most
users don't. They just type away, and then the line
scrolls automatically. It is *exceedingly* difficult
to handle this situation in a consistent way. I've
had to write my own "text breaking" code to be sure
I could find line numbers as the user typed.

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: scroll problem with widget_text [message #56669 is a reply to message #56668] Wed, 07 November 2007 08:22 Go to previous message
ben.bighair is currently offline  ben.bighair
Messages: 221
Registered: April 2007
Senior Member
On Nov 7, 11:14 am, Jarret (whetsto...@gmail.com) wrote:
> I am using a text widget in IDL.
> When I write more lines of text to it than the y dimension can
> accomidate, I get a nice scroll bar. However, the widget will
> always display the top of the text. Is there any way to make the
> widget automatically scroll to the end when the value is set?
>

Hi,

Take a look at WIDGET_CONTROL and the SET_TEXT_TOP_LINE keyword.
Here's the online help for it...

SET_TEXT_TOP_LINE
This keyword applies to widgets created with the WIDGET_TEXT
function.
Set this keyword to the zero-based line number of the line to be
positioned on the topmost visible line in the text widget's viewport.
No horizontal scrolling is performed. Note that this is a line number,
not a character offset.

Cheers,
Ben
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: scroll problem with widget_text
Next Topic: Re: !path problem

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 17:13:01 PDT 2025

Total time taken to generate the page: 0.00634 seconds