New topic: Possible to have cursors in 2 textareas?
<http://forums.realsoftware.com/viewtopic.php?t=41967> Page 1 of 1 [ 3 posts ] Previous topic | Next topic Author Message dudleyH Post subject: Possible to have cursors in 2 textareas?Posted: Tue Dec 27, 2011 2:55 am Joined: Wed Oct 14, 2009 7:41 pm Posts: 52 I have a routine that needs to display cursors in 2 textareas at the same time. Both textareas are in the same window. One is actually where the next key (character) will be displayed and the other is only a pointer that shows where certain action will take place depending on the next key. I know that the textarea with Focus has the cursor, but can't figure out a work around for the other textarea. I know this is unusual. Thanks Top pixe656 Post subject: Re: Possible to have cursors in 2 textareas?Posted: Tue Dec 27, 2011 4:50 am Joined: Wed May 20, 2009 11:02 am Posts: 253 Hi, You could add a character (|, for example) at the required position in the textarea that has lost focus and make it blink using a timer (alternate a blank character and the one you are using). If the width of | and the blank character are not equal and the cursor is not at the end of the textArea, all the text after the cursor will slightly move back and forth. If that's the case, you could try to find a character that has exactly the same width as a blank space. HTH, Pixe _________________ Using RS2011r2 on Windows7. Top dudleyH Post subject: Re: Possible to have cursors in 2 textareas?Posted: Tue Dec 27, 2011 7:00 am Joined: Wed Oct 14, 2009 7:41 pm Posts: 52 pixe656 wrote:You could add a character (|, for example) at the required position in the textarea that has lost focus and make it blink using a timer (alternate a blank character and the one you are using). I have thought of doing that even using a bullet as the cursor in the textarea which does not have focus. It is only a marker of where characters are inserted or deleted. I will be using LeftB, RightB, and Len on the text and I would have to take into consideration where the bullet was and remove it before doing other calculations since it would exist as a real character and not just a cursor. So out it would come, do the calculations and then put it back. But, if that ends up the only way...guess I will have to deal with it. Top Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending Page 1 of 1 [ 3 posts ] -- Over 1500 classes with 29000 functions in one REALbasic plug-in collection. The Monkeybread Software Realbasic Plugin v9.3. http://www.monkeybreadsoftware.de/realbasic/plugins.shtml [email protected]
