Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » basic cursor question
basic cursor question [message #458924] Tue, 26 July 2005 16:04 Go to next message
Francis Leboutte is currently offline Francis LeboutteFriend
Messages: 19
Registered: July 2009
Junior Member
Hello,

How can I get the current cursor of a shell?

I want to set the cursor to a particular system cursor and later to set
the cursor back to what it was.

Francis
Re: basic cursor question [message #458931 is a reply to message #458924] Tue, 26 July 2005 17:55 Go to previous messageGo to next message
Steve Northover is currently offline Steve NorthoverFriend
Messages: 1636
Registered: July 2009
Senior Member
You can't. On systems such as X Motif, it's not possible to query the
current cursor from the operating system. However, we should at least
provide API to get back the cursor that you set. Please enter a feature
request. Thanks!

"Francis Leboutte" <f.leboutte@algo.be> wrote in message
news:dc5muc$gnb$1@news.eclipse.org...
> Hello,
>
> How can I get the current cursor of a shell?
>
> I want to set the cursor to a particular system cursor and later to set
> the cursor back to what it was.
>
> Francis
Re: basic cursor question [message #458932 is a reply to message #458924] Tue, 26 July 2005 18:01 Go to previous messageGo to next message
Philipp is currently offline PhilippFriend
Messages: 49
Registered: July 2009
Member
This is a multipart message in MIME format.
--=_alternative 00630B33C125704A_=
Content-Type: text/plain; charset="US-ASCII"

Hi,

if you have the current display you call

getCursorControl() on it which returns the control the cursor is on
currently. Then on the control call findCursor() which returns you the
cursor, Then call setCursor(Cursor yourCursor) on the control with your
modified cursor.

hth
-philipp
--=_alternative 00630B33C125704A_=
Content-Type: text/html; charset="US-ASCII"


<br><font size=2 face="sans-serif">Hi,</font>
<br>
<br><font size=2 face="sans-serif">if you have the current display you
call </font>
<br>
<br><font size=2 face="sans-serif">getCursorControl() on it which returns
the control the cursor is on currently. Then on the control call findCursor()
which returns you the cursor, Then call setCursor(Cursor yourCursor) on
the control &nbsp;with your modified cursor.</font>
<br>
<br><font size=2 face="sans-serif">hth</font>
<br><font size=2 face="sans-serif">-philipp</font>
--=_alternative 00630B33C125704A_=--
Re: basic cursor question [message #458940 is a reply to message #458931] Tue, 26 July 2005 21:15 Go to previous messageGo to next message
Francis Leboutte is currently offline Francis LeboutteFriend
Messages: 19
Registered: July 2009
Junior Member
Steve Northover a écrit :
> You can't. On systems such as X Motif, it's not possible to query the
> current cursor from the operating system. However, we should at least
> provide API to get back the cursor that you set. Please enter a feature
> request. Thanks!

I would already happy if I could get the current cursor style. Is this
also not possible?

> "Francis Leboutte" <f.leboutte@algo.be> wrote in message
> news:dc5muc$gnb$1@news.eclipse.org...
>
>>Hello,
>>
>>How can I get the current cursor of a shell?
>>
>>I want to set the cursor to a particular system cursor and later to set
>>the cursor back to what it was.
>>
>>Francis
>
>
>
Re: basic cursor question [message #458941 is a reply to message #458932] Tue, 26 July 2005 21:17 Go to previous messageGo to next message
Francis Leboutte is currently offline Francis LeboutteFriend
Messages: 19
Registered: July 2009
Junior Member
philipp_tiedt@de.ibm.com a écrit :
>
> Hi,
>
> if you have the current display you call
>
> getCursorControl() on it which returns the control the cursor is on
> currently. Then on the control call findCursor() which returns you the
> cursor, Then call setCursor(Cursor yourCursor) on the control with your
> modified cursor.

findCursor seems to be not defined.

Francis

>
> hth
> -philipp
Re: basic cursor question [message #458953 is a reply to message #458941] Wed, 27 July 2005 09:45 Go to previous messageGo to next message
Philipp is currently offline PhilippFriend
Messages: 49
Registered: July 2009
Member
This is a multipart message in MIME format.
--=_alternative 0035982BC125704B_=
Content-Type: text/plain; charset="US-ASCII"

You are right,

its defined, however its not visible. You can get the Location though if
it helps you further ? Using getCursorLocation() on Display.

What do you need the current style for ?

Philipp

--=_alternative 0035982BC125704B_=
Content-Type: text/html; charset="US-ASCII"


<br><font size=2 face="sans-serif">You are right,</font>
<br>
<br><font size=2 face="sans-serif">its defined, however its not visible.
You can get the Location though if it helps you further ? Using getCursorLocation()
on Display. </font>
<br>
<br><font size=2 face="sans-serif">What do you need the current style for
?</font>
<br>
<br><font size=2 face="sans-serif">Philipp</font>
<br>
--=_alternative 0035982BC125704B_=--
Re: basic cursor question [message #458959 is a reply to message #458953] Wed, 27 July 2005 12:44 Go to previous messageGo to next message
Francis Leboutte is currently offline Francis LeboutteFriend
Messages: 19
Registered: July 2009
Junior Member
philipp_tiedt@de.ibm.com a écrit :
>
> You are right,
>
> its defined, however its not visible. You can get the Location though if
> it helps you further ? Using getCursorLocation() on Display.
>
> What do you need the current style for ?

In any control, I want to store (keep) the current cursor or its style
before to change (set) the cursor, in order to later restore the cursor
as it was.

BTW, can I set the same cursor instance in several controls or have I to
create a new cursor instance for each control?

Francis
>
> Philipp
Re: basic cursor question [message #459157 is a reply to message #458959] Tue, 02 August 2005 18:28 Go to previous messageGo to next message
Steve Northover is currently offline Steve NorthoverFriend
Messages: 1636
Registered: July 2009
Senior Member
The cursor is inherited. Set it in the parent.

"Francis Leboutte" <f.leboutte@algo.be> wrote in message
news:42E781BD.3000902@algo.be...
> philipp_tiedt@de.ibm.com a
Re: basic cursor question [message #459158 is a reply to message #458940] Tue, 02 August 2005 18:30 Go to previous messageGo to next message
Steve Northover is currently offline Steve NorthoverFriend
Messages: 1636
Registered: July 2009
Senior Member
Nope. Just set the cursor in the shell to something and reset it it null.
That will restore the default cursor.

"Francis Leboutte" <f.leboutte@algo.be> wrote in message
news:42E6A7F0.2010700@algo.be...
> Steve Northover a
Re: basic cursor question [message #459344 is a reply to message #458931] Sat, 06 August 2005 16:41 Go to previous messageGo to next message
Francis Leboutte is currently offline Francis LeboutteFriend
Messages: 19
Registered: July 2009
Junior Member
"Steve Northover" <steve_northover@ca.ibm.com> wrote:

>You can't. On systems such as X Motif, it's not possible to query the
>current cursor from the operating system. However, we should at least
>provide API to get back the cursor that you set. Please enter a feature
>request.

How can I do this?

Francis

>Thanks!
>
>"Francis Leboutte" <f.leboutte@algo.be> wrote in message
>news:dc5muc$gnb$1@news.eclipse.org...
>> Hello,
>>
>> How can I get the current cursor of a shell?
>>
>> I want to set the cursor to a particular system cursor and later to set
>> the cursor back to what it was.
>>
>> Francis
>
Francis Leboutte
www.algo.be
Re: basic cursor question [message #459345 is a reply to message #459157] Sat, 06 August 2005 16:50 Go to previous messageGo to next message
Francis Leboutte is currently offline Francis LeboutteFriend
Messages: 19
Registered: July 2009
Junior Member
"Steve Northover" <steve_northover@ca.ibm.com> wrote:

>The cursor is inherited. Set it in the parent.

I'm not sure to understand. Do you mean I have to set the cursor in
the parent shell?

This is not the answer to my question I think which was: can I set the
**same** cursor instance in several controls?

Thanks,

Francis

>
>"Francis Leboutte" <f.leboutte@algo.be> wrote in message
>news:42E781BD.3000902@algo.be...
>> philipp_tiedt@de.ibm.com a écrit :
>> >
>> > You are right,
>> >
>> > its defined, however its not visible. You can get the Location though if
>> > it helps you further ? Using getCursorLocation() on Display.
>> >
>> > What do you need the current style for ?
>>
>> In any control, I want to store (keep) the current cursor or its style
>> before to change (set) the cursor, in order to later restore the cursor
>> as it was.
>>
>> BTW, can I set the same cursor instance in several controls or have I to
>> create a new cursor instance for each control?
>>
>> Francis
>> >
>> > Philipp
>
Francis Leboutte
www.algo.be
Re: basic cursor question [message #459382 is a reply to message #459344] Mon, 08 August 2005 14:35 Go to previous messageGo to next message
Steve Northover is currently offline Steve NorthoverFriend
Messages: 1636
Registered: July 2009
Senior Member
Enter a bugzilla report at Eclipse.org.

"Francis Leboutte" <f.leboutte@algo.be> wrote in message
news:51q9f15iafog60ek9csk6hkh8o2qfmhovn@4ax.com...
> "Steve Northover" <steve_northover@ca.ibm.com> wrote:
>
> >You can't. On systems such as X Motif, it's not possible to query the
> >current cursor from the operating system. However, we should at least
> >provide API to get back the cursor that you set. Please enter a feature
> >request.
>
> How can I do this?
>
> Francis
>
> >Thanks!
> >
> >"Francis Leboutte" <f.leboutte@algo.be> wrote in message
> >news:dc5muc$gnb$1@news.eclipse.org...
> >> Hello,
> >>
> >> How can I get the current cursor of a shell?
> >>
> >> I want to set the cursor to a particular system cursor and later to set
> >> the cursor back to what it was.
> >>
> >> Francis
> >
> Francis Leboutte
> www.algo.be
Re: basic cursor question [message #459383 is a reply to message #459345] Mon, 08 August 2005 14:36 Go to previous messageGo to next message
Steve Northover is currently offline Steve NorthoverFriend
Messages: 1636
Registered: July 2009
Senior Member
1) You can set the same cursor instance in many controls.
2) If you set the cursor in a parent, it will be inherited by the children.

"Francis Leboutte" <f.leboutte@algo.be> wrote in message
news:i9q9f1tghs5ikkhsh2uif184sok8sb14kb@4ax.com...
> "Steve Northover" <steve_northover@ca.ibm.com> wrote:
>
> >The cursor is inherited. Set it in the parent.
>
> I'm not sure to understand. Do you mean I have to set the cursor in
> the parent shell?
>
> This is not the answer to my question I think which was: can I set the
> **same** cursor instance in several controls?
>
> Thanks,
>
> Francis
>
> >
> >"Francis Leboutte" <f.leboutte@algo.be> wrote in message
> >news:42E781BD.3000902@algo.be...
> >> philipp_tiedt@de.ibm.com a
Re: basic cursor question [message #459386 is a reply to message #459383] Mon, 08 August 2005 16:11 Go to previous messageGo to next message
Francis Leboutte is currently offline Francis LeboutteFriend
Messages: 19
Registered: July 2009
Junior Member
"Steve Northover" <steve_northover@ca.ibm.com> wrote:

>1) You can set the same cursor instance in many controls.
>2) If you set the cursor in a parent, it will be inherited by the children.

Many thanks,

Francis

>
>"Francis Leboutte" <f.leboutte@algo.be> wrote in message
>news:i9q9f1tghs5ikkhsh2uif184sok8sb14kb@4ax.com...
>> "Steve Northover" <steve_northover@ca.ibm.com> wrote:
>>
>> >The cursor is inherited. Set it in the parent.
>>
>> I'm not sure to understand. Do you mean I have to set the cursor in
>> the parent shell?
>>
>> This is not the answer to my question I think which was: can I set the
>> **same** cursor instance in several controls?
>>
>> Thanks,
>>
>> Francis
>>
>> >
>> >"Francis Leboutte" <f.leboutte@algo.be> wrote in message
>> >news:42E781BD.3000902@algo.be...
>> >> philipp_tiedt@de.ibm.com a écrit :
>> >> >
>> >> > You are right,
>> >> >
>> >> > its defined, however its not visible. You can get the Location though
>if
>> >> > it helps you further ? Using getCursorLocation() on Display.
>> >> >
>> >> > What do you need the current style for ?
>> >>
>> >> In any control, I want to store (keep) the current cursor or its style
>> >> before to change (set) the cursor, in order to later restore the cursor
>> >> as it was.
>> >>
>> >> BTW, can I set the same cursor instance in several controls or have I
>to
>> >> create a new cursor instance for each control?
>> >>
>> >> Francis
>> >> >
>> >> > Philipp
>> >
>> Francis Leboutte
>> www.algo.be
>
Francis Leboutte
www.algo.be
Re: basic cursor question [message #459553 is a reply to message #458924] Wed, 10 August 2005 14:43 Go to previous message
Roland Tepp is currently offline Roland TeppFriend
Messages: 336
Registered: July 2009
Senior Member
Can't You use BusyIndicator for whatever You are doing?
Or do You want another cursor (not the hourglass?)

In any way check out the org.eclipse.swt.custom.BusyIndicator

Francis Leboutte wrote:
> Hello,
>
> How can I get the current cursor of a shell?
>
> I want to set the cursor to a particular system cursor and later to set
> the cursor back to what it was.
>
> Francis

--
Roland Tepp
Previous Topic:Table
Next Topic:Can the Column Width in a TableViewer to be smaller than the Column Text?
Goto Forum:
  


Current Time: Fri Apr 16 03:38:01 GMT 2021

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

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

Back to the top