Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!news.swapon.de!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: "Thorsten Albers" Newsgroups: comp.lang.basic.visual.misc Subject: Re: RichEdit control question Date: Tue, 18 Oct 2011 15:17:59 +0000 (UTC) Organization: Albert-Ludwigs-Universität Freiburg Lines: 39 Message-ID: <01cc8da9$1bfe6cb0$6d01a8c0@k8s8x> References: <01cc8b90$69e63db0$6d01a8c0@k8s8x> Injection-Date: Tue, 18 Oct 2011 15:17:59 +0000 (UTC) Injection-Info: mx04.eternal-september.org; posting-host="M6L6EArEYrenqasj8MWmHg"; logging-data="24248"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/j9cnlpK4c5NAutyWMay/c" X-Newsreader: Microsoft Internet News 4.70.1155 Cancel-Lock: sha1:RFypUzaOSsDoOqADkL+7F5ggR5I= Xref: x330-a1.tempe.blueboxinc.net comp.lang.basic.visual.misc:512 Kalkidas schrieb im Beitrag ... > OTOH MSWord and WordViewer apparently do have the ability to tell if > something is "formerly hidden", since they will toggle hidden text off > and on.... They just have an internal flag "Show hidden text". If this flag is set, hidden text gets rendered to the output device like 'normal' text; if it is not set, hidden text gets not rendered to the output device - it's just such simple. That's the reason, why toggling "Show hidden text" is so 'fast', because no data has to be changed, only the output on the device has to be re-rendered, which - since it's usually the screen - isn't very much to do. > I'll just have to keep looking. Maybe I will have to simply do > search/replace of rtf tags. But it takes a long time.... No. There are two approaches for you to speed things up: a) Write your own routine to render the contents of the control used to the output device. b) Change the hidden flag of the contents of the control - but change it only for that section of the contents which is currently visible! A rough sketch: - Get the visible section of the contents of the control - Change the hidden text property of the text parts in this section of the contents which have this property set, and save information about the changes made. - Let the control redraw its contents to the output device (e.g. Refresh) Before any action takes place which may change the contents of the control of course you have to restore the original property values from the information saved before. -- Thorsten Albers gudea at gmx.de