Hey Raphael,
Tooltips are indeed only plain text. You want to have an XHTML tooltip
instead?
As to your image:
a.setData(WLink.new("http://host.com/thumbnail.jpg"),ItemDataRole::DecorationRole
)
(the model shouldn't contain widgets, since that's not a proper separation
of model and view).
Regards,
koen
2013/12/19 Raphael Bauduin <rbli...@gmail.com>
> Hi,
>
> I'm trying to display images in WTableView cells, as well as in tooltips
> of these cells, but I'm not getting it working.
>
> Here is the code with which I build my model (JRuby code using JWt):
>
> @data.each_index do |row_index|
> row=@data[row_index] #row_index was used in another try, kept it
> here though not used below
> values = row.values
>
> a = WStandardItem.new
> a.setData(values[0].to_i,ItemDataRole::UserRole+1 )
>
> a.setData(WImage.new(WLink.new("http://host.com/thumbnail.jpg")),ItemDataRole::DecorationRole
> )
>
> b = WStandardItem.new
> b.setData(values[1].to_s,ItemDataRole::UserRole+1 )
> b.setData(values[1].to_s,ItemDataRole::DisplayRole )
>
> @model.appendRow([ a, b])
> end
>
>
> I've tried with ItemDataRole::ToolTipTole, but it seems to only handle
> text.
> Any advice on a better way of building the model is also welcome. my
> approach seems very verbose.
>
> Thanks
>
> Raph
>
>
> ------------------------------------------------------------------------------
> Rapidly troubleshoot problems before they affect your business. Most IT
> organizations don't have a clear picture of how application performance
> affects their revenue. With AppDynamics, you get 100% visibility into your
> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics
> Pro!
> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
> _______________________________________________
> witty-interest mailing list
> witty-interest@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/witty-interest
>
>
------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
witty-interest mailing list
witty-interest@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/witty-interest