Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Selecting image vs. text in tree or table
Selecting image vs. text in tree or table [message #449152] Tue, 18 January 2005 20:46 Go to next message
Mia Stern is currently offline Mia SternFriend
Messages: 19
Registered: July 2009
Junior Member
Hi-

Is it possible to determine if a click has occurred on the image vs. the
text in a Tree (or Table) Viewer? I'd like to implement different
behavior depending on what was actually clicked.

Thanks,
- Mia
Re: Selecting image vs. text in tree or table [message #449160 is a reply to message #449152] Tue, 18 January 2005 22:46 Go to previous messageGo to next message
Veronika Irvine is currently offline Veronika IrvineFriend
Messages: 1272
Registered: July 2009
Senior Member
Use getImageBounds(int) (returns bounds of image) and getBounds(int)
(returns bounds of image plus text) to determine where the click occurred.

"Mia Stern" <mia_stern@us.ibm.com> wrote in message
news:csjsjf$vmq$1@www.eclipse.org...
> Hi-
>
> Is it possible to determine if a click has occurred on the image vs. the
> text in a Tree (or Table) Viewer? I'd like to implement different
> behavior depending on what was actually clicked.
>
> Thanks,
> - Mia
>
Re: Selecting image vs. text in tree or table [message #449272 is a reply to message #449160] Thu, 20 January 2005 00:13 Go to previous messageGo to next message
Steve Northover is currently offline Steve NorthoverFriend
Messages: 1636
Registered: July 2009
Senior Member
Users expect trees and tables to have the native selection characterstics
and don't expect different things to happen depending on whether the image
or the text is selected.

"Veronika Irvine" <veronika_irvine@oti.com> wrote in message
news:csk3l0$654$1@www.eclipse.org...
> Use getImageBounds(int) (returns bounds of image) and getBounds(int)
> (returns bounds of image plus text) to determine where the click occurred.
>
> "Mia Stern" <mia_stern@us.ibm.com> wrote in message
> news:csjsjf$vmq$1@www.eclipse.org...
> > Hi-
> >
> > Is it possible to determine if a click has occurred on the image vs. the
> > text in a Tree (or Table) Viewer? I'd like to implement different
> > behavior depending on what was actually clicked.
> >
> > Thanks,
> > - Mia
> >
>
>
Re: Selecting image vs. text in tree or table [message #449290 is a reply to message #449272] Thu, 20 January 2005 15:39 Go to previous messageGo to next message
Mia Stern is currently offline Mia SternFriend
Messages: 19
Registered: July 2009
Junior Member
Native Windows Explorer behavior is to have the rename text box appear
only if the name of the object is clicked on, not the icon. It is that
behavior I'm trying to replicate.

Why doesn't TreeItem have getImageBounds ?

- Mia

Steve Northover wrote:
> Users expect trees and tables to have the native selection characterstics
> and don't expect different things to happen depending on whether the image
> or the text is selected.
>
> "Veronika Irvine" <veronika_irvine@oti.com> wrote in message
> news:csk3l0$654$1@www.eclipse.org...
>
>>Use getImageBounds(int) (returns bounds of image) and getBounds(int)
>>(returns bounds of image plus text) to determine where the click occurred.
>>
>>"Mia Stern" <mia_stern@us.ibm.com> wrote in message
>>news:csjsjf$vmq$1@www.eclipse.org...
>>
>>>Hi-
>>>
>>>Is it possible to determine if a click has occurred on the image vs. the
>>>text in a Tree (or Table) Viewer? I'd like to implement different
>>>behavior depending on what was actually clicked.
>>>
>>>Thanks,
>>>- Mia
>>>
>>
>>
>
>
Re: Selecting image vs. text in tree or table [message #449294 is a reply to message #449290] Thu, 20 January 2005 18:11 Go to previous messageGo to next message
Veronika Irvine is currently offline Veronika IrvineFriend
Messages: 1272
Registered: July 2009
Senior Member
In 3.1 it does (since after M4).

"Mia Stern" <mia_stern@us.ibm.com> wrote in message
news:41EFD0B8.2000503@us.ibm.com...
> Native Windows Explorer behavior is to have the rename text box appear
> only if the name of the object is clicked on, not the icon. It is that
> behavior I'm trying to replicate.
>
> Why doesn't TreeItem have getImageBounds ?
>
> - Mia
>
> Steve Northover wrote:
>> Users expect trees and tables to have the native selection characterstics
>> and don't expect different things to happen depending on whether the
>> image
>> or the text is selected.
>>
>> "Veronika Irvine" <veronika_irvine@oti.com> wrote in message
>> news:csk3l0$654$1@www.eclipse.org...
>>
>>>Use getImageBounds(int) (returns bounds of image) and getBounds(int)
>>>(returns bounds of image plus text) to determine where the click
>>>occurred.
>>>
>>>"Mia Stern" <mia_stern@us.ibm.com> wrote in message
>>>news:csjsjf$vmq$1@www.eclipse.org...
>>>
>>>>Hi-
>>>>
>>>>Is it possible to determine if a click has occurred on the image vs. the
>>>>text in a Tree (or Table) Viewer? I'd like to implement different
>>>>behavior depending on what was actually clicked.
>>>>
>>>>Thanks,
>>>>- Mia
>>>>
>>>
>>>
>>
>>
>
Re: Selecting image vs. text in tree or table [message #449297 is a reply to message #449290] Thu, 20 January 2005 18:46 Go to previous messageGo to next message
Steve Northover is currently offline Steve NorthoverFriend
Messages: 1636
Registered: July 2009
Senior Member
Right. Makes sense.

"Mia Stern" <mia_stern@us.ibm.com> wrote in message
news:41EFD0B8.2000503@us.ibm.com...
> Native Windows Explorer behavior is to have the rename text box appear
> only if the name of the object is clicked on, not the icon. It is that
> behavior I'm trying to replicate.
>
> Why doesn't TreeItem have getImageBounds ?
>
> - Mia
>
> Steve Northover wrote:
> > Users expect trees and tables to have the native selection
characterstics
> > and don't expect different things to happen depending on whether the
image
> > or the text is selected.
> >
> > "Veronika Irvine" <veronika_irvine@oti.com> wrote in message
> > news:csk3l0$654$1@www.eclipse.org...
> >
> >>Use getImageBounds(int) (returns bounds of image) and getBounds(int)
> >>(returns bounds of image plus text) to determine where the click
occurred.
> >>
> >>"Mia Stern" <mia_stern@us.ibm.com> wrote in message
> >>news:csjsjf$vmq$1@www.eclipse.org...
> >>
> >>>Hi-
> >>>
> >>>Is it possible to determine if a click has occurred on the image vs.
the
> >>>text in a Tree (or Table) Viewer? I'd like to implement different
> >>>behavior depending on what was actually clicked.
> >>>
> >>>Thanks,
> >>>- Mia
> >>>
> >>
> >>
> >
> >
>
Re: Selecting image vs. text in tree or table [message #449298 is a reply to message #449290] Thu, 20 January 2005 18:47 Go to previous message
Steve Northover is currently offline Steve NorthoverFriend
Messages: 1636
Registered: July 2009
Senior Member
http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt.sni ppets/src/org/eclipse/swt/snippets/Snippet111.java?rev=HEAD& amp;content-type=text/vnd.viewcvs-markup

"Mia Stern" <mia_stern@us.ibm.com> wrote in message
news:41EFD0B8.2000503@us.ibm.com...
> Native Windows Explorer behavior is to have the rename text box appear
> only if the name of the object is clicked on, not the icon. It is that
> behavior I'm trying to replicate.
>
> Why doesn't TreeItem have getImageBounds ?
>
> - Mia
>
> Steve Northover wrote:
> > Users expect trees and tables to have the native selection
characterstics
> > and don't expect different things to happen depending on whether the
image
> > or the text is selected.
> >
> > "Veronika Irvine" <veronika_irvine@oti.com> wrote in message
> > news:csk3l0$654$1@www.eclipse.org...
> >
> >>Use getImageBounds(int) (returns bounds of image) and getBounds(int)
> >>(returns bounds of image plus text) to determine where the click
occurred.
> >>
> >>"Mia Stern" <mia_stern@us.ibm.com> wrote in message
> >>news:csjsjf$vmq$1@www.eclipse.org...
> >>
> >>>Hi-
> >>>
> >>>Is it possible to determine if a click has occurred on the image vs.
the
> >>>text in a Tree (or Table) Viewer? I'd like to implement different
> >>>behavior depending on what was actually clicked.
> >>>
> >>>Thanks,
> >>>- Mia
> >>>
> >>
> >>
> >
> >
>
Previous Topic:OpenGL Linux: no depth testing
Next Topic:Drag and drop with link
Goto Forum:
  


Current Time: Sat Nov 16 01:16:37 GMT 2019

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

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

Back to the top