This setup has worked great for me.

# show data in richedit control with vertical and horizontal scroll bars if
# needed, and don't wrap each line.
$RText = $W->AddRichEdit(
   -name => "RText",
   -font => $SFont,
   -top  => 50,
   -left => 10,
   -height => 375,
   -width  => 472,
   -style  => WS_VISIBLE | WS_VSCROLL | WS_HSCROLL | ES_AUTOVSCROLL |
ES_AUTOHSCROLL | ES_MULTILINE,
   -readonly => 1,
);

# To load the Richedit control use this syntax
$RText->Load("myfile.txt",1);  # load a notepad.exe style text file


Eric Hansen

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Cam Watson
Sent: Friday, January 07, 2000 9:37 AM
To: [EMAIL PROTECTED]
Subject: Re: [perl-win32-gui] Scrollbars


Mike,

--- Mike Janger <[EMAIL PROTECTED]> wrote:
> How can I put a scrollbar on a RichEdit control?  Is
> it a style?

The code below works for me.  Another style I've seen
added sometimes is ES_AUTOVSCROLL.  I don't really know
what all of these styles do though.  I mean these ones
seem pretty self-explanitory but I've never seen any
documentation for them so I can't be sure they arn't
doing something completly unexpected.  If someone could
point me towards info on these styles please let me
know.  I hope this code helps you Mike.


$Win->AddRichEdit( -name  => "Text",
                   -text    => "",
                   -left    => $left,
                   -top     => $top,
                   -width   => $Win->ScaleWidth,
                   -height  => $Win->ScaleHeight,
                   -style   => WS_VISIBLE | WS_VSCROLL
                   | ES_MULTILINE,
                   );


Cam Watson



=====
Quote of the Day:
__________________________________________________
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com


Reply via email to