From: Johan L. <jo...@ba...> - 2001-06-16 20:39:35
|
Sean wrote: >How do you force a textfield selection to be visible within the >textfield? I've been reading through the posts on autoscrolling a >RichEdit, but that makes it scroll down a given number of lines. I >want the textfield to scroll only if the selection is not visible, >and then only enough to make the selection visible. (I could change >to a RichEdit if this is not possible with a textfield.) Don't know about a Textfield, but if you chose to go with a RichEdit, you can use the sub Win32::GUI::AdHoc::richEditScroll, available at: http://www.bahnhof.se/~johanl/perl/Win32GUI/ I guess you still have to keep track of the selection and at what line it is located somehow. Just looked up the Textfield thing BTW: An application sends an EM_LINESCROLL message to scroll the text vertically or horizontally in a multiline edit control. EM_LINESCROLL wParam = (WPARAM) cxScroll; // characters to scroll horizontally lParam = (LPARAM) cyScroll; // lines to scroll vertically /J ------ ---- --- -- -- -- - - - - - Johan Lindström Boss Casinos Sourcerer jo...@ba... http://www.bahnhof.se/~johanl/ If the only tool you have is a hammer, everything tends to look like a nail |