Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Change mouse cursor for all Text Widgets in a RAP Application
Change mouse cursor for all Text Widgets in a RAP Application [message #1864499] Wed, 20 March 2024 07:52 Go to next message
Steffen Gottschald is currently offline Steffen GottschaldFriend
Messages: 2
Registered: March 2024
Junior Member
Hi,

Is it possible to change the mouse cursor for text fields in Eclipse RAP via a stylesheet?

e.g., to change the background color works:

Text {
background-color: #6f8b95;
}

But this doesn't work:

Text {
cursor: pointer;
}

Thank you for your support.
Re: Change mouse cursor for all Text Widgets in a RAP Application [message #1864539 is a reply to message #1864499] Fri, 22 March 2024 07:14 Go to previous messageGo to next message
Peter Hermsdorf is currently offline Peter HermsdorfFriend
Messages: 45
Registered: August 2011
Member
For an explanation of how styling in RAP works see https://eclipse.dev/rap/developers-guide/devguide.php?topic=theming.html
Not every CSS style is supported.
Using RWT.CUSTOM_VARIANT should work in your case.

Bye Peter
Re: Change mouse cursor for all Text Widgets in a RAP Application [message #1864543 is a reply to message #1864539] Fri, 22 March 2024 10:19 Go to previous messageGo to next message
Steffen Gottschald is currently offline Steffen GottschaldFriend
Messages: 2
Registered: March 2024
Junior Member
Hi Peter,

Thank you for your reply. I tried using CUSTOM_VARIANT, but unfortunately, it didn't work either. Similarly, the background color changed, but the cursor remained unchanged.

Regarding your statement, "Not every CSS style is supported," it appears to be true in this case. I just checked the documentation (which I should have done first),:
https://download.eclipse.org/rt/rap/doc/3.28/guide/reference/theming/Text.html
and it seems that for the text widget, the cursor attribute is not an available CSS property. ( but it is available for other widgets like ExpandBar).

Thanks again,
Steffen


Re: Change mouse cursor for all Text Widgets in a RAP Application [message #1864575 is a reply to message #1864543] Tue, 26 March 2024 16:54 Go to previous message
Dmitry Dukhov is currently offline Dmitry DukhovFriend
Messages: 192
Registered: February 2013
Senior Member
not sure my advices is right
try to use without css
widget.setCursor(new Cursor(Display.getCurrent(), SWT.CURSOR_HAND));
there are many cursor styles SWT.CURSOR_*

Previous Topic:Example for a plugin-based product file for RAP
Next Topic:I want to use websocket
Goto Forum:
  


Current Time: Fri Jun 21 06:49:32 GMT 2024

Powered by FUDForum. Page generated in 0.03661 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top