Tuesday, September 27, 2011

Re: is it possible to open menu on Header of celltable?

working tanksssssssssss!

On Sep 27, 5:39 pm, Sudhakar Abraham <s.abra...@datastoregwt.com>
wrote:
> Put a ClickableTextCell in Header. Override  onBrowserEvent() method
> in Header class.  Try the code below.
>
> //code segement
>
>  Header<String> header = new Header<String>(new ClickableTextCell())
>  {
>       @Override
>       public String getValue()
>       {
>             return "your_header_name";
>       }
>
>      Command command = new Command()
>       {
>           public void execute()
>           {
>               Window.alert("clicked");
>           }
>       };
>
>       @Override
>       public void onBrowserEvent(Context context, Element parent,
> NativeEvent event)
>       {
>         MenuBar menuBar = new MenuBar();
>         MenuItem fileName = new MenuItem("New",command);
>         menuBar.addItem(fileName);
>         menuBar.setSize("10px", "10ex");
>       }
>
>     };
>
>    //add your header to celltable
>     cellTable.addColumn(your_column_name, header);
>
> S. Abrahamwww.DataStoreGwt.com
> Persist objects directly in GAE
>
> On Sep 27, 4:08 pm, Brito <britoscho...@gmail.com> wrote:
>
> > I wana add menu on header of celltable.
>
>

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment