I would like to create popup or dialog box which should be like another window where i need to have cross (*) mark to close window. please any one can suggeston this..
Gwt has a dialog box. You add layout panels to it and arrange what you want to show in it.
You can use custom button
to add your cross.
Related
I just want to make a moving button , Is there a way to do that in GWT? Thanks in advance.
BS
Out of the box, you can use a DialogBox to display your button. DialogBox can be moved around, but you will need to display something in a Caption that is used for dragging.
Another option is to use PopupPanel. It can be completely invisible (no Caption), but you will have to implement dragging functionality on your own. The advantage is that a PopupPanel floats on top of all the other layers in your UI.
Finally, you can simply add dragging functionality to a regular button. Just remember to check for the boundaries so that a user cannot drag your button outside of the visible browser area - or obscure some important elements of the UI.
I would like to create GWT chat application. So I used GWT DialogBox for chatting. For easy to chat , I don't want to see glass style of dialog. I setted setGlassEnabled(false); . Now I can't see glass but I got a problem. I can't select any text , can't click on any links or buttons of widgets these are not in dialog.
For instance, after I opened my chat dialog, I can't click on any of my header links.
Make sure your dialog is not set to modal.
I have a VerticalPanel consisting of an Image and a Label with some text in it. What I'm trying to implement is something like a Desktop Icon - when you click it - it gets 'marked' and probably a menu will appear. When you click outside of the icon - the menu should disappear and the icon will get unmarked.
Currently I'm trying to achieve this by wrapping the VerticalPanel in a FocusPanel and playing with some focus handling but I have not achieved any satisfying results so far.
I would appreciate if you could give me some guidance on how to best implement this.
Thanks.
You're on the right track with the FocusPanel wrapper. The key point about the FocusPanel for what you want to do is that it captures clicks (by implementing HasClickHandlers). You can then handle clicks and assign the panel CSS rules e.g. border-width, border-color, or background-color, etc., according to however you'd like to indicate your icon as pressed/selected.
Its seems that you need a ToggleButton and a basic PopupPanel
i use the GWT TabPanel and want to use a DialogBox in one of these tabs. I think the DialogBox is added to the RootPanel because i see the box in every Tab.
Is there a option to see the box only in the box there the panel was created? Or must i create my own DialogBox or overwrite some methods (.show?)
Greetz,
Destiny
A DialogBox is is a popup and not attached to any of your panels. So you can't use a Dialogox in a TabPanel as it will not be attached to that panel as you found out yourself (it's attached to the RootPanel). If you want to only show this dialogbox when a specific tab is selected you need to hide the dialog box when another tab is selected. You can do this by adding a TabListener on the TabPanel and implement the onBeforeTabSelected method and check which tab is selected and hide or show the dialogbox.
I want to add editable combo box in GWT , so please tell me the solution ?
Try the Advanced GWT Components, specifically
org.gwt.advanced.client.ui.widget.ComboBox
You can see them in action at the demo page here, just select the Text & Button Widgets tab and have look at the source code behind it.