Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Drawing images on right side of TableItem(Problem with drawing images on the right side of TableItem inside a single column)
Drawing images on right side of TableItem [message #539241] Thu, 10 June 2010 03:19 Go to next message
Albert Pikus is currently offline Albert Pikus
Messages: 70
Registered: October 2009
Member
Hi,

I'm trying to draw images on the right side of text inside the TableItem (similarly as demonstrated in snippet
http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt.sni ppets/src/org/eclipse/swt/snippets/Snippet230.java?view=co),
but within just a single Table column, not within all the columns.

Is this possible to achieve? I think that this should be possible, but I couldn't find a way to do it.

Any help would be welcome, greetings,

Albert
Re: Drawing images on right side of TableItem [message #539261 is a reply to message #539241] Thu, 10 June 2010 04:25 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas Schindl
Messages: 5296
Registered: July 2009
Senior Member
then simply check the event.index which marks the column of the cell you
are just painting.

Tom

Am 10.06.10 09:19, schrieb Albert:
> Hi,
>
> I'm trying to draw images on the right side of text inside the TableItem
> (similarly as demonstrated in snippet
> http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt.sni ppets/src/org/eclipse/swt/snippets/Snippet230.java?view=co),
>
> but within just a single Table column, not within all the columns.
>
> Is this possible to achieve? I think that this should be possible, but I
> couldn't find a way to do it.
>
> Any help would be welcome, greetings,
>
> Albert
>
Re: Drawing images on right side of TableItem [message #539263 is a reply to message #539241] Thu, 10 June 2010 04:28 Go to previous messageGo to next message
Vijay Raj
Messages: 608
Registered: July 2009
Senior Member
use event.index as an if condition for each colum in paint code.

---------------------
why, mr. Anderson, why, why do you persist?
Because I Choose To.
Regards,
Vijay
Re: Drawing images on right side of TableItem [message #539511 is a reply to message #539263] Fri, 11 June 2010 02:55 Go to previous message
Albert Pikus is currently offline Albert Pikus
Messages: 70
Registered: October 2009
Member
Thank you all, using event.index solves the problem.


Best regards,

Albert
Previous Topic:Browser calls "completed(Event e)" of ProgressAdapter more than once
Next Topic:Browser calls "completed(Event e)" of ProgressAdapter more than once
Goto Forum:
  


Current Time: Tue Sep 02 00:24:58 EDT 2014

Powered by FUDForum. Page generated in 0.01707 seconds