If you think this is possible, can you just point me in the right direction?
I am not asking for full source code of a working example but just something like: 'This should be possible with a custom cellformatter or ...'
Thanks a lot!
(I really need the tooltips because my dataset is big and the tilesize is only 16x16 so no room for other info on the screen besides the tileicon)
I vote for this question. I asked the same thing long time ago but didn't get any answer.
I also wasn't able to find at least a way of making the DetailViewerField text to wrap on the next line as a solution for the same problem: long text associated with the tile content.
In SmartClient you are able to provide any component you like as the class to use for tiles. This will be available at some point in SmartGWT, but if you need it sooner you can either use the underlying SmartClient API (tileConstructor) or sponsor the enhancement.
Can you provide an example of using "the underlying SmartClient API (tileConstructor)"? I have the same need and I'm not clear on how to make use of the parts of SmartClient that aren't yet in SmartGWT. A simple example would be a great help.
Just discovered how to override TileGrid.getTileHTML() which gives me what I needed.
Code:
final TileGrid searchResults = new TileGrid() {
@Override
protected String getTileHTML(Record record) {
return "HTML for tile using attributes from record";
}
};
hmm.. this fills the Tile content with that text and replaces what I did describe with the DetailViewer... no tooltip at all... I'm showing a cut text as TileGrid Image label and really want to show the full text as tooltip - can anyone give me a hint, no matter if pure GWT or JSNI...
As previously indicated, to customize tiles you would currently need to use the underlying SmartClient APIs. See AutoChildren - TileGrid.tile is an AutoChild. So you can create a custom SmartClient class and provide that as the TileGrid.tileConstructor.
If this is too daunting, use TileLayout, where you can construct the tiles directly and add them to the layout.
Thx Iso and Sjivan. I had a look into the Tile Layout but would prefer to try the option proposed by Iso. I've some experiences with JSNI, anyway I'm missing a few links to understand how I could implement my own TileGrid tile rendering (incl. Tool tip) and assign this somehow on GWT level... could you enlighten me a little bit more please?
Ekki
* GWT Rocks! * SmartGWT Rocks Even Harder! * SmartGWT PRO 2.0,
GWT 2.0, Jetty 7.0.0, Eclipse 3.5.1, JRE 1.6.0_16 *
For Evaluation only: MySQL 5.1.41, Connector/J 5.1.10
I really hope to limit my JavaScript activities to a minimal level. So becoming a full SC programmer, just to solve this issue, isn't an option to me right now.
But maybe for you it's only a couple of minutes and obviously others need the same functionality too. So could you be so kind and provide something in this direction? Pleeeaaazzzzeee!
Ekki
* GWT Rocks! * SmartGWT Rocks Even Harder! * SmartGWT PRO 2.0,
GWT 2.0, Jetty 7.0.0, Eclipse 3.5.1, JRE 1.6.0_16 *
For Evaluation only: MySQL 5.1.41, Connector/J 5.1.10
Comment