1. Single line RichEdit controls

Hi,
Is it possible to make single line RichEdit controls?
This page seems to indicate that you can just remove the ES_MULTILINE
style:
http://msdn.microsoft.com/library/default.asp?URL=/library/psdk/winui/richedit_5lpv.htm
But that isn't working...
I added the line removeStyle(RE,ES_MULTILINE) to the richedit.exw
example program but it's richedit control remained multi-line.

Any ideas?

Thomas Parslow (PatRat) ICQ #:26359483
Rat Software
http://www.rat-software.com/
Please leave quoted text in place when replying

new topic     » topic index » view message » categorize

2. Re: Single line RichEdit controls

> Is it possible to make single line RichEdit controls?

    I think if you add WS_HSCROLL to the style( ES_AUTOHSCROLL if you
want ), and remove the ES_MULTILINE, you'll get a single-line RichEdit
control (with scroll bar).
    When I tried it, it still showed the vertical scroll bars, but by
removing the WS_VSCROLL and ES_AUTOVSCROLL style bits, they were removed
from the window.
    Without the horizontal scroll bars, it just stopped at the right-hand
edge, and wouldn't accept any more input (maybe it's just me though smile

    Jason

new topic     » goto parent     » topic index » view message » categorize

3. Re: Single line RichEdit controls

> Is it possible to make single line RichEdit controls?

Sure, try this...

myRE = create(RichEdit, "", thewin, x, y, w, h,
                       {WS_CHILD,
                        WS_VISIBLE,
                        WS_HSCROLL,
                        WS_TABSTOP,
                        ES_SAVESEL,
                        WS_BORDER
                       }
              )

> I added the line removeStyle(RE,ES_MULTILINE) to the richedit.exw
> example program but it's richedit control remained multi-line.

It seems that once the richedit control is created, you can't do much to
change its behaviour. So its best to create one how you want in the first
place.

------
Derek Parnell
Melbourne, Australia
"To finish a job quickly, go slower."

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu