Re: Rich Edit Questions

new topic     » goto parent     » topic index » view thread      » older message » newer message
lockiedownunder said...

1> How do I clear a RichEdit control? I tried clear(RichEd) but this didn't work.

2> How do a change a RichEdit control to and from "Read Only"? So as to only allow editing when it suits me.

I haven't tried these ideas yet, as I'm about to go see Carlton beat Essendon ... anyhow ...

setText(RE, "") -- Clear the control. 
 
RE = create(RichEdit, "", aWin, x,y, w,h, ES_READONLY) -- read only control 
 
removeStyle(RE, {ES_READONLY, 0}) -- Take away readonly style 
addStyle(RE,  {ES_READONLY, 0}) -- Add readonly style 

I'm not sure if the remove/add style works with richedits as they have loads of quirks.

If not, then I'd suggest you have two controls - one readonly and one not - overlay each other, then when you want to use other or the other, just make visible the one you want.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu