Skip to main content



      Home
Home » Eclipse Projects » Remote Application Platform (RAP) » unable to make a Link widget clickable
unable to make a Link widget clickable [message #117315] Thu, 01 January 2009 00:26 Go to next message
Eclipse UserFriend
Happy New Year!
I would like hyperlinked text to show up, with my app able to respond to
click events. When I create a Link widget, I have 3 problems:
(1) the text in the link does not look like a link
(2) the mouse pointer does not change to a hand on mouseover, as
traditional links do, and most importantly:
(3) the link does not seem to broadcase click events.

Here is a code snippet.
Link link = new Link(composite, SWT.NONE);
link.setToolTipText("Click to sort");
link.addSelectionListener(listener);
link.setText(displayName);
link.setData(columnName);

Clicking the link does not call my SelectionListener's widgetSelected()
nor widgetDefaultSelected() methods.

Thanks for any help!
David Donohue
Re: unable to make a Link widget clickable [message #117332 is a reply to message #117315] Thu, 01 January 2009 03:31 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: ifurnadjiev.innoopract.com

Hi David,
Happy New Year! To solve all of your problems you simply have to put the
<a>...</a> around the text if it not exist in your "displayName"
variable. For example:
Link link = new Link(composite, SWT.NONE);
link.setToolTipText("Click to sort");
link.addSelectionListener(listener);
link.setText("<a>"+displayName+"</a>");
link.setData(columnName);

Best,
Ivan

David Donohue wrote:
> Happy New Year!
> I would like hyperlinked text to show up, with my app able to respond
> to click events. When I create a Link widget, I have 3 problems: (1)
> the text in the link does not look like a link
> (2) the mouse pointer does not change to a hand on mouseover, as
> traditional links do, and most importantly:
> (3) the link does not seem to broadcase click events.
>
> Here is a code snippet.
> Link link = new Link(composite, SWT.NONE);
> link.setToolTipText("Click to sort");
> link.addSelectionListener(listener);
> link.setText(displayName);
> link.setData(columnName);
>
> Clicking the link does not call my SelectionListener's
> widgetSelected() nor widgetDefaultSelected() methods.
>
> Thanks for any help!
> David Donohue
>
Re: unable to make a Link widget clickable [message #117358 is a reply to message #117332] Fri, 02 January 2009 22:33 Go to previous message
Eclipse UserFriend
Thanks, Ivan! That did the trick.
Best,
David Donohue
Previous Topic:Typo in ActivityMessages class
Next Topic:Setting minimum height and width of window
Goto Forum:
  


Current Time: Thu May 08 08:17:45 EDT 2025

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

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

Back to the top