Thanks again so much for your help
> Well, DOM is a GWT class, so I consider my solution to be pure GWT :)
> Plus the widget handling the History change will be also pure GWT
Oh, I understood that, I was infering your solution was much better
then what I had already.
Anyway, I think I'm 90% there now, I might just need a little more
nudge in the right direction next time you got a mo.
I have replaced the caption, and its dragable, and it even has an
image in it now...looking pretty like my old caption, but now 100%
gwt.
However, the onClick of the image isnt fireing. I suspect this is
because the whole caption panel area is hogging all the click events.
This is despite my addClickListener being only added to the label as
so;
HorizontalPanel newCaptionBar = new HorizontalPanel();
Label newCaptionLabel = new Label(" - blah - ");
Image closeImage = new Image("close.png");
closeImage.addClickHandler(new ClickHandler(){
public void onClick(ClickEvent event) {
//this dosnt fire
ThisDia.hide();
History.newItem("");
}
});
newCaptionBar.add(newCaptionLabel);
newCaptionBar.add(closeImage);
Element td = getCellElement(0, 1);
DOM.appendChild(td, newCaptionBar.getElement());
adopt(newCaptionBar);
newCaptionBar.setStyleName("caption");
newCaptionLabel.addMouseListener(this);
As an expirement I tried disableing the addMouseListener line, with
no effect. (the whole dialogue is still dragable ver the caption area.
It seeems I'm thus not removing the original dragability when the
(widgets standard) caption area is removed by your
DOM.removeChild((Element)captionElement.getParentElement
(),captionElement);
line.
Is the dragability set to the parent of the caption?
Or maybe the error is because I am using 1.6, which now use's
handelers rather then listeners? (allthough they should still work)
I tried swapping addMouseListener for addMouseMoveHandler anyway with
no success...DialogBox dosnt impliment MouseHandlers itself, and
Caption interface which does is private. (so I left it as a
MouseListener for now).
>
> VoilĂ ! It should work or at least give you enough inspiration to make
> it work. Frankly, I don't think I can be more specific without coming
> to your workplace and coding it for you.
Ok my address is 64 b.... ;)
No, I think I can get there now with enough expirements, just some
teathing trouble now rather then "completely havnt a clue where to
start"
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---