thanks so much!

On 7月6日, 上午3時48分, Subhrajyoti Moitra <[email protected]> wrote:
> try this..
>
> public class MyFlexTable extends FlexTable implements HasMouseOutHandlers,
>         HasMouseOverHandlers {
>
>     public MyFlexTable() {
>         super();
>         Button hiddenButton=new Button("I am hidden");
>         hiddenButton.setVisible(false);
>         setWidget(0, 0, new Hyperlink("Some Link", "somelink"));
>         setWidget(0, 1, hiddenButton);
>         setBorderWidth(1);
>         setWidget(1, 0, new HTML("Some empty line.."));
>         getFlexCellFormatter().setColSpan(1, 0, 2);//just to see the mouse
> rollover in other rows of the table.
>
>     }
>
>     @Override
>     public HandlerRegistration addMouseOutHandler(MouseOutHandler handler) {
>         // TODO Auto-generated method stub
>         return addDomHandler(handler, MouseOutEvent.getType());
>     }
>
>     @Override
>     public HandlerRegistration addMouseOverHandler(MouseOverHandler handler)
> {
>         // TODO Auto-generated method stub
>         return addDomHandler(handler, MouseOverEvent.getType());
>     }
>
> }
>
> and now from the client class, which will host this table.
>
> final MyFlexTable table=new MyFlexTable();
>         table.addMouseOverHandler(new MouseOverHandler() {
>
>             @Override
>             public void onMouseOver(MouseOverEvent event) {
>                 table.getWidget(0, 1).setVisible(true);
>
>             }
>         });
>         table.addMouseOutHandler(new MouseOutHandler() {
>
>             @Override
>             public void onMouseOut(MouseOutEvent event) {
>                 table.getWidget(0, 1).setVisible(false);
>
>             }
>         });
>
> HTH.
>
> Thanks,
> Subhro.
>
>
>
> On Mon, Jul 5, 2010 at 11:57 PM, cy dev <[email protected]> wrote:
> > i have a flextable where there an anchor link in cell(0,0), and there
> > is a button in cell(0,1) which is invisible by default.  how to make
> > it such that, when mouse over the flextable, the button in cell(0,1)
> > becomes visible; when mouse out the flextable, the button becomes
> > invisible again?
>
> > the difficulty is, flextable does not have mouseover and mouseout
> > handler.  but if i add the flextable to a focuspanel, the anchor and
> > the button would then be 'masked' by the focuspanel then cannot be
> > clicked.
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Google Web Toolkit" group.
> > To post to this group, send email to [email protected].
> > To unsubscribe from this group, send email to
> > [email protected]<google-web-toolkit%2Bunsubs 
> > [email protected]>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/google-web-toolkit?hl=en.

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

Reply via email to