Label Text Selection

Dirk Lemmermann dlemmermann at gmail.com
Wed Aug 21 10:26:50 UTC 2024


Now that I have a text control with selection support I can solve many of my issues, but not all of them. I still feel like it would be extremely useful if “Text” would support selection out of the box (off by default, enabled via API or CSS).

Dirk


> On 20 Aug 2024, at 16:09, Dirk Lemmermann <dlemmermann at gmail.com> wrote:
> 
> I have taken quizynox approach and used it for the TextView control in GemsFX. After some additions the control now supports a text selection behaviour similar to the one found in TextArea (ctrl-c, ctrl-a, stylable “highlight” properties, double click for word selection, triple click for paragraph selection, etc…). 
> 
> Dirk
> 
> 
>> On 19 Aug 2024, at 11:02, Marius Hanl <mariushanl at web.de> wrote:
>> 
>> I also think this might be a good addition to the JFX Core.
>> This behavior should be off by default, but can be turned on via CSS or Code.
>> Another idea could be a new Control that extends from Label.
>>  
>> -- Marius
>>  
>>  
>> Gesendet: Freitag, 16. August 2024 um 12:12 Uhr
>> Von: "Dirk Lemmermann" <dlemmermann at gmail.com>
>> An: "openjfx-dev" <openjfx-dev at openjdk.org>
>> Betreff: Label Text Selection
>> Hi everyone,
>> 
>> I recently added a custom text control (called “TextView") to the GemsFX project. It supports a somewhat limited text selection. Selection is only possible on a per-word basis. I received a bit of feedback on this control and I was wondering whether it would be worth thinking about adding a general text selection capability to labels. Is this something worth looking into? Is it even feasible?
>> 
>> I guess one of the reasons why this topic keeps popping up is the fact that users are so used to selecting any text in web pages, but they can’t do it in desktop apps.
>> 
>> Dirk
>>  
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/openjfx-dev/attachments/20240821/edb74a2c/attachment.htm>


More information about the openjfx-dev mailing list