No I-beam in read-only TextEditor

Discussion and support for general JUCE issues

No I-beam in read-only TextEditor

Postby TheVinn » Thu May 10, 2012 7:48 pm

A Read-only text editor does not change the cursor to an I-beam. It should, or else there is no visual feedback that selection is allowed. Furthermore, the accuracy of placing the selection starting point is worse with a regular pointer than it is with an I-beam.

I understand that certain people may think changing the cursor to an I-beam on a read-only TextEditor is a bad idea but let me point out that both Windows and Mac OS do this for selectable read-only text.
Open Source: LayerEffects, VFLib, SimpleDJ, DSP Filters, LuaBridge, JUCE, FreeType, TagLib
"This isn't a big project, it shouldn't take long." - Jules
User avatar
TheVinn
JUCE UberWeenie
 
Posts: 2976
Joined: Sat Aug 29, 2009 11:31 am
Location: Marina del Rey, California

Re: No I-beam in read-only TextEditor

Postby jules » Fri May 11, 2012 9:23 am

Well, my preference is for not having an i-beam. I guess I could be persuaded that if the component is clicked to focus it, then it could show an i-beam, but I don't think it should have one when you casually move the mouse across a text editor in, for example, a message window.
User avatar
jules
Fearless Leader
 
Posts: 17218
Joined: Mon Sep 06, 2004 9:03 am
Location: London, UK

Re: No I-beam in read-only TextEditor

Postby TheVinn » Fri May 11, 2012 12:53 pm

jules wrote:I don't think it should have one when you casually move the mouse across a text editor in, for example, a message window.


I'm reading this as "I don't think a Juce read only TextEditor should be behave the same way as every native platform static-text object which supports selection."

But I would like to have the option (to behave the same way as widgets from Apple and Microsoft). Toggling a property on the control to get conforming behavior is fine. You said that you'd feel comfortable with requiring a click to get the conforming behavior, and that's fine, as long as I can turn that part off (Apple and Microsoft widgets don't require a click before displaying an I-beam).

Conclusion: I would like to set an option on a read-only TextEditor that makes it conform to selectable, read only static text controls from Apple and Microsoft.
Open Source: LayerEffects, VFLib, SimpleDJ, DSP Filters, LuaBridge, JUCE, FreeType, TagLib
"This isn't a big project, it shouldn't take long." - Jules
User avatar
TheVinn
JUCE UberWeenie
 
Posts: 2976
Joined: Sat Aug 29, 2009 11:31 am
Location: Marina del Rey, California

Re: No I-beam in read-only TextEditor

Postby jules » Fri May 11, 2012 1:42 pm

Ok, well, I'll have a think.
User avatar
jules
Fearless Leader
 
Posts: 17218
Joined: Mon Sep 06, 2004 9:03 am
Location: London, UK

Re: No I-beam in read-only TextEditor

Postby TheVinn » Fri May 11, 2012 1:49 pm

Better yet, try my demo app - it provides an interactive Lua console. Try selecting text in the read-only area and see how awkward it is:

LuaBridge Demo

tests.png
tests.png (5.22 KiB) Viewed 266 times
Open Source: LayerEffects, VFLib, SimpleDJ, DSP Filters, LuaBridge, JUCE, FreeType, TagLib
"This isn't a big project, it shouldn't take long." - Jules
User avatar
TheVinn
JUCE UberWeenie
 
Posts: 2976
Joined: Sat Aug 29, 2009 11:31 am
Location: Marina del Rey, California

Re: No I-beam in read-only TextEditor

Postby TheVinn » Thu May 24, 2012 2:09 pm

Friendly reminder
Open Source: LayerEffects, VFLib, SimpleDJ, DSP Filters, LuaBridge, JUCE, FreeType, TagLib
"This isn't a big project, it shouldn't take long." - Jules
User avatar
TheVinn
JUCE UberWeenie
 
Posts: 2976
Joined: Sat Aug 29, 2009 11:31 am
Location: Marina del Rey, California

Re: No I-beam in read-only TextEditor

Postby jules » Thu May 24, 2012 2:21 pm

Ok, I think I'll change it.
User avatar
jules
Fearless Leader
 
Posts: 17218
Joined: Mon Sep 06, 2004 9:03 am
Location: London, UK


Return to General JUCE discussion

Who is online

Users browsing this forum: Google Feedfetcher and 2 guests