in reply to Re^4: Cursor at end of Richedit control
in thread Cursor at end of Richedit control
Did you try the code above?
This is what I meant by minimal, working test app. I just cribed it out of that old program that used a RichEdit control. Supply it with a filename on the command line and it will:
It should be easy enough to add the relevant bits to your existing app.
#! perl -slw use strict; use Win32::GUI; my $main = Win32::GUI::Window->new( -width => 800, -height => 600, -name => 'Main', ); my $re = $main->AddRichEdit( -width => $main->ScaleWidth, -height => $main->ScaleHeight, -hscroll => 1, -vscroll => 1, ); $re->Load( $ARGV[ 0 ]||die( 'No file' ), 1 ); $re->SetSel( ( $re->TextLength() ) x 2 ); $re->Scroll( 'bottom' ); $re->Scroll( -10 ); $re->SetFocus; $main->Show(); Win32::GUI::Dialog(); exit; sub Main_Resize { $re->Resize( $main->ScaleWidth, $main->ScaleHeight ); }
|
|---|