Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    tooltip for tilegrid images

    I am trying to show a tooltip when hovering the mouse over a tilegrid image.

    I tried several things but no luck so far.

    #2
    Is this possible?
    I don't see it in the tilegrid examples of the showcase.

    I tried several things: detailviewerfield cellformatter, gettilehtml(), HoverHandlers,...

    but I am not able to add a tooltip (with record related content)

    Comment


      #3
      Isomorphic,

      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)

      Comment


        #4
        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.

        Comment


          #5
          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.

          Comment


            #6
            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.

            Comment


              #7
              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";
              	}
              };

              Comment


                #8
                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...

                Thx ia and Happy New Year, folks!

                Ekki

                * GWT Rocks! * SmartGWT Rocks Even Harder! * SmartGWT PRO 2.0,
                GWT 2.0, GAE 1.2.8, Jetty 7.0.0, Eclipse 3.5.1, JRE 1.6.0_16 *

                Comment


                  #9
                  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.

                  Comment


                    #10
                    Could you provide a demo link showing TileLayout use, please? Looked into the Showcase repo but didn't find something at first sight

                    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

                    CI-CUBE.BIZ feat. CubeBrowser.AppSpot.com www.EasternGraphics.com/X-4GPL

                    Comment


                      #11
                      There isn't one.

                      The APIs are extremely straightforward.

                      Comment


                        #12
                        See the code for this sample.

                        Obviously not all API's have a sample so try using the javadocs API reference even if you don't see a corresponding sample.

                        Sanjiv

                        Comment


                          #13
                          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

                          CI-CUBE.BIZ feat. CubeBrowser.AppSpot.com www.EasternGraphics.com/X-4GPL

                          Comment


                            #14
                            We'd suggest first using the SmartClient docs to create a working sample in SmartClient, then tackling JSNI integration in SmartGWT.

                            Comment


                              #15
                              HNY folks!

                              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

                              CI-CUBE.BIZ feat. CubeBrowser.AppSpot.com www.EasternGraphics.com/X-4GPL

                              Comment

                              Working...
                              X