Hi Danny,
That shouldn't be the case. Which browser were you testing on when this
occurred?
I ran the code snippet below and tested it out in hosted IE6, web mode
IE6/7/8, FF3 and Chrome, and in all cases the onMouseUp() method was called
and the dialog box was repositioned. Give it a try and let me know how it
looks for you.
public void onModuleLoad() {
final DialogBox dialogBox = new DialogBox() {
public void onMouseUp(Widget sender, int x, int y) {
this.setPopupPosition(0, 0);
super.onMouseUp(sender, x, y);
}
};
dialogBox.setHTML("<b>Bonjour la police!</b>");
RootPanel.get().add(dialogBox);
dialogBox.center();
}
Hope that helps,
-Sumit Chandel
On Thu, Mar 5, 2009 at 12:20 AM, Danny Schimke <[email protected]>wrote:
> It does not work. The onMouseUp is never called...
>
> 2009/2/27 Sumit Chandel <[email protected]>
>
> Hi Danny,
>> Here's one possible solution - you could override the
>> DialogBox.onMouseUp() method to re-position the dialog box depending on
>> where it was when the user lets go of it.
>>
>> For example:
>>
>> final DialogBox dialogBox = new DialogBox() {
>> public void onMouseUp(Widget sender, int x, int y) {
>> if(exceedsBounds(x,y) {
>> this.setPopupPosition(xpos, ypos); //recenter to boundary edge or
>> center page
>> }
>> super.onMouseUp(sender, x, y);
>> }
>> };
>>
>> Hope that helps,
>> -Sumit Chandel
>>
>> On Mon, Feb 23, 2009 at 6:04 AM, Danny Schimke
>> <[email protected]>wrote:
>>
>>> No idea?
>>>
>>> 2009/1/28 Danny Schimke <[email protected]>
>>>
>>> Hello!
>>>>
>>>> Is it possible to restrain the DialogBox to move out on right and bottom
>>>> side of the browsers windows? When I move the box over it's header it
>>>> should
>>>> stay completely in the visible browser window area, because I disabled the
>>>> scroll bars and the user should not be able to move the DialogBox in a not
>>>> viewed area.
>>>>
>>>> And second: in IE6 the DialogBox is only dragable by the text in it's
>>>> header. Is there a clean way to allow IE6 users to drag&drop the box like
>>>> in
>>>> FF or IE7 over the complete header?
>>>>
>>>> Thank you very much!
>>>> - Danny
>>>>
>>>
>>>
>>>
>>>
>>
>>
>>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---