1. Win32LIb v.50c: RichText control and 'cut'
- Posted by Judith Evans <camping at FLASH.NET> Oct 08, 2000
- 366 views
Well what I stated before about cut and RichText is only true if there is only one line in the RichText control. With multiple lines, after 'cut' the getStream pulls everything. getRichText() however, WILL get all the data after the 'cut' portion even if only 1 line of data. But how do I tell getRichText to retrieve the entire contents of the RichText? I tested by this getRichText(RT,{1,10}) where my 'cut' portion was before column 10. Using i=length(RT) gives me the dreaded 'exceeds 300 statements......'. If I pick a number larger than the actual text it also fails. The user doesn't select text so I can't go that route. Even if the user did, I can't get the getRichText option to work with an atom which I understand says to get the highlighted text. I'm doing something wrong, but don't know what. Can anyone supply me a sample of the getRichText with an atom? I tried getRichText(RT,1), getRichText(RT,{1}) and even getRichText(RT,num) and getRichText(RT{num}) but all fail. Thanks, Judith
2. Re: Win32LIb v.50c: RichText control and 'cut'
- Posted by Derek Parnell <dparnell at BIGPOND.NET.AU> Oct 09, 2000
- 423 views
Hi Judith, did you read the win32lib (v0.52) documentation? ----------------- getRichText( id, range ) Get text from a /RichEdit control Returns Text in the given range. If "range" is an atom, any selected text is returned. However if there is no selected text and "range" is -1 then all the text is returned. If "range" is a sequence, "range" should be a 2-element sequence with the first element the starting index to be retrieved, and the second element the last index. To always retrieve all the text in the control, set the range to {0, 0}. ------ eg. sequence theText theText = getRichText(myeditor, -1) ------ cheers Derek ----- Original Message ----- From: "Judith Evans" <camping at FLASH.NET> To: <EUPHORIA at LISTSERV.MUOHIO.EDU> Sent: Monday, October 09, 2000 12:15 AM Subject: Win32LIb v.50c: RichText control and 'cut' > Well what I stated before about cut and RichText is only true if there is > only one line in the RichText control. With multiple lines, after 'cut' the > getStream pulls everything. > > getRichText() however, WILL get all the data after the 'cut' portion even if > only 1 line of data. But how do I tell getRichText to retrieve the entire > contents of the RichText? I tested by this getRichText(RT,{1,10}) where my > 'cut' portion was before column 10. Using i=length(RT) gives me the dreaded > 'exceeds 300 statements......'. If I pick a number larger than the actual > text it also fails. The user doesn't select text so I can't go that route. > Even if the user did, I can't get the getRichText option to work with an > atom which I understand says to get the highlighted text. I'm doing > something wrong, but don't know what. Can anyone supply me a sample of the > getRichText with an atom? I tried getRichText(RT,1), getRichText(RT,{1}) and > even getRichText(RT,num) and getRichText(RT{num}) but all fail. > > > Thanks, > > Judith
3. Re: Win32LIb v.50c: RichText control and 'cut'
- Posted by Judith Evans <camping at FLASH.NET> Oct 08, 2000
- 374 views
Hi, Derek, Well, no, I hadn't looked at version 52 documentation because I had not downloaded past v51. But I did look at it v.53 a few minutes ago, and walla, a lot of my questions are answered. However, now my stumpling block is coloration of text. I had assumed I would pass something like putStream(RT,SreamRTF,"Red{this is some text}Blue{this is some more text}") but it appears not. Can you, or Matt, give me some clue? Thanks, Judith