I have strange problem..
I want to do this:
I have a focuspanel. In default I want to give him focus:
this.setFocus(true);
I have function onBlur which is able to save all information from focuspanel. But the focus panel doesn's have focus... I must click on him, and in other place to start function onBlur..
Second problem is a... When I have focus and I click on other widget in my focus panel I lose focus.. (Which I have from click on this panel.) It is not expect.
Only way to save information is to fill it in the focus panel, click on the blank space in focus panel and in other place out focus panel.. I don't know how to fix it..
Please, help!
A FlowPanel is a div and can't have focus by default, you need to set the tabindex: https://stackoverflow.com/a/3656524/66416
Related
I want to have this component's size to only encapsulate the info button not the whole area. Is there a way to have a component have different sizes depending on components state.
Right now when i hover over that entire green area it changes to hover state, i want it to only activate when the "i" is hovered
If you choose the component state and go to the left menu you can hide layer you dont want
I know this is an old post but hopefully this helps someone. This same problem was driving me insane! But there is a simple solution:
Rather than using the default "Hover State" in the component create a "New State" which will function as your hover state and name it whatever you like and design the default and new states. Then, go to the Prototype tab, select the icon you want to trigger the hover animation, then add a new Interaction on the right panel. Set the Trigger to Hover, and the Destination to your new state. Works perfectly, and now you will only trigger the hover animation when hover over your icon rather than the entire component area.
I have a disabled button. On mouse hover of this disabled button, I need to display a popup using GWT.
I tried to wrap it inside a panel and coded mouse hover for the panel. But it's not working instantly all the time.
IMO you should try to avoid this situation. For example, if you just want to show a small tooltip you can use a different title for enabled and disabled state explaining the disabled cause.
If you still want to react to an over event on disable button you can use something like this.
SimplePanel p = new SimplePanel();
Button b = new Button("hover me to toggle disable"); p.add(b);
p.addDomHandler(ev -> button.setEnabled(!b.isEnabled()), MouseOverEvent.getType());
RootPanel.get().add(p);
Although as you already have noticed, the browser does not fire over events on disabled inputs. So if you move the mouse without passing through the panel and goes directly to the button you will not receive the event. You can fix this applying this style.
button.gwt-Button[disabled] {
pointer-events: none;
}
But probably this might have some downsides or might not work in all browsers.
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.
Brief:
I have a GWT TextBox and CellList. I would like the up/down keys to do keyboard selection in the CellList while focus is still in the Textbox (search filter). How do I do that?
Details:
Right now, if I focus the celllist, it behaves as I want, however, I don't want to have to leave the search field to select an element with the up/down keys. The up/down keys seem to have a behavior I don't need in the Textbox (move to beginning/end of text).
It's actually rather easy: use a SuggestBox and provide your own SuggestionDisplay, which can be a CellList or Menu widget (or whatever) sitting anywhere you want it.
The DefaultSuggestionDisplay opens a Menu in a PopupPanel, but that's just the default implementation. If you ever used Google Wave, what you're asking for looks a lot like the person chooser when inviting people to your waves, and it was a SuggestBox AFAICT.
Ok so could anyone please help me out with the VB for auto entering information into a text box, by clicking certian label boxes on a form in access 2003.
I built this thing using label boxes as "sort of links" instead of button for navigation/commands etc, and I have this power point presentation viewer on one of the forms.
The client has numerous briefings and this will be great for me to provide a little something for them to be able to get their briefings from one spot.
So if I list the choices for the month out on the form as label boxes (with little mouse move events to resemble a web link) and they click on it to select, then the only way I know how this may become functional is if I add a text box to the form, and make it not visible, that way I can name it, and add it to the file path string and it works.
But how do I create the action of clicking the "link" result in "NVOWEFDJHF" into text box?
Anyone know a better way?
Yeah I am an amateur, so I am ALWAYS willing to learn a better way.
Thanks very much!
I would recommend using a transparent button instead of a label.
The main reason is that you can set the mouse cursor to become a small hand when you hover over the button, so it gives back information to the user that this can be clicked.
With a label, the user cannot make the difference between a normal label and one that can be clicked since there is no visual cue.
To create a button that resemble a label:
Add the button to the form
In the properties for the button, set the following:
Format > Back-Style: Transparent
Other > Cursor on Hover: Hyperlink Hand
Other > Name: btAutoFill (or whatever name you want)
If you want the button to resemble a link a bit more, you can change it's caption's format, making it blue and underlined if you wish.
Now if you view the form, you will see that the mouse cursor will change when you move over the 'button label'.
To automatically fill-in other controls when you click your button, add the code to handle its OnClick event (in the button's properties, under Events > On Click, choose [Event Procedure]):
Public Sub btAutoFill_Click()
myTextBox = "NVOWEFDJHF"
End Sub
Quick air code here...
Private Sub MyLabel_OnClick()
Me.MyTextBox = "NVOWEGDJHF"
End Sub
Don't forget your error handling.
You're making this as difficult as possible by using an approach that is not Access-native. The simplest way to make the labels "clickable" is to put a transparent command button over them. But that means the MouseMove events will go to the command button, so you'll have to have its events do the MouseOver actions.