Re: Win32LIb v.50c: RichText control and 'cut'
- Posted by Derek Parnell <dparnell at BIGPOND.NET.AU> Oct 09, 2000
- 422 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