Is there any easy way to append to an "AddRichEdit" text field? I would like
it to just add to the text field without replacing it.

$myRichEdit->Select(-1,-1);



I found a work around which was to concatenate strings together and feed it
to the AddRichEdit->Text but I am not sure this will work on large amounts
of text.



Here is some sample code for what I mean:



I would like to replace the start2_click with something a little less memory
intensive. It would probably be ok if I could force it to go to the bottom
of the window after every ->Text("");





use Win32::GUI;



$Win = new Win32::GUI::Window(

      -left   => 301,

      -top    => 236,

      -width  => 485,

      -height => 571,

      -title   => "Test for TexBox"

      );







$output= $Win->AddRichEdit(

    -name     => "Test AddRichEdit",

    -text     => "",

    -left    => 7,

    -top     => 138,

    -width   => 463,

    -height  => 392,

    -readonly => 1,



        );



$Win->AddButton(   # add a button to the main window

            -name   => "close",

            -text   => "Close",

            -top    => 65,

            -left   => 370,

            -width  => 81,

            -height => 25,

);



$Win->AddButton(   # add a button to the main window

            -name   => "start",

            -text   => "Start",

            -top    => 40,

            -left   => 370,

            -width  => 81,

            -height => 25,

);





$Win->AddButton(   # add a button to the main window

            -name   => "start2",

            -text   => "Start2",

            -top    => 90,

            -left   => 370,

            -width  => 81,

            -height => 25,

);





sub Window_Terminate {

   return -1;

}



$Win->Show();

Win32::GUI::Dialog();



sub close_Click {

exit;

}



sub start_Click {

            for ($i = 0; $i <= 10; $i++){

            $output->Text("$i \n");

            }

}



sub start2_Click {

            $starttext = "";

            for ($i = 0; $i <= 10; $i++){

                        $starttext = $starttext . "$i\n";

            }

            $output->Text($starttext);

}





Thanks



Don




_________________________________________________________________
Get MSN 8 Dial-up Internet Service FREE for one month. Limited time offer-- sign up now! http://join.msn.com/?page=dept/dialup


Reply via email to