1. VEL005 Questions
- Posted by "C. K. Lester" <cklester at TICNET.COM> Sep 14, 1999
- 322 views
Hopefully somebody out there can lend a hint or two (or complete solution): 1. How do I apply strikeout to selected text when the user presses <BACKSPACE> or <DELETE>? 2. How do I tell the window (RICHTEXT) *NOT* to wrap text? 3. How can I make the cursor advance word-to-word, instead of character-to-character? IOW, when I press the <Left Arrow Key>, it jumps to the beginning of the next word instead of moving the cursor to the next letter. 4. How to I fully justify text, especially if it's just one line of text and I need it to stretch all the way. 5. How would I print the text from the RICHEDITOR? Can I specify only certain pages to print? Thanks! ck
2. Re: VEL005 Questions
- Posted by Gary Dumer <dumer9354 at MY-DEJA.COM> Sep 14, 1999
- 360 views
> >1. How do I apply strikeout to selected text when the user presses ><BACKSPACE> or <DELETE>? Try this... using <BACKSPACE>, procedure RichEdit1OnKeyPress(integer id, integer p, integer q) . . if p = 8 then y = GetAttribute(RichEdit1,SELSTART) SetAttribute(RichEdit1,{{SELSTART, y-length(word)}}) SetAttribute(RichEdit1,{{SELLENGTH, length(word)}}) SetAttribute(RichEdit1,{{SELRICHSTYLE, "strikeout"}}) end if . . end procedure Of course, a lot of other stuff will have to be done beforehand. Like figuring where the word starts in the line and consequently, it's length. But that should get you started. >2. How do I tell the window (RICHTEXT) *NOT* to wrap text? SetAttribute(RichEdit1,{MEMOSCROLL, BOTHSCROLL}) SetAttribute(RichEdit1,{WORDWRAP,FALSE}) >3. How can I make the cursor advance word-to-word, instead of >character-to-character? IOW, when I press the <Left Arrow Key>, it jumps to >the beginning of the next word instead of moving the cursor to the next letter. Same as strikeout above... providing you can figure out when the arrow keys are pressed. I'm not sure you can do that the way it's currently set up. >4. How to I fully justify text, especially if it's just one line of text >and I need it to stretch all the way. Have you tried PARAALIGNMENT? That allows you to justify text. >5. How would I print the text from the RICHEDITOR? Can I specify only >certain pages to print? If you want to print RTF formatted text... the print option will be in version 0.06. Otherwise, you can print it from Euphoria. Gary.