I want suggestions in suggestBox that is constructed from TextArea to be shown under the current line in text area, because by default it is shown under the whole text area. How can i implement such functionality?
Looking at the source code of SuggestBox, seems like you'll probably have to implement your own SuggestionDisplay, since the default one uses PopupPanel to show suggestions, which is positioned bellow the suggest box:
// Show the popup under the TextBox.
suggestionPopup.showRelativeTo(positionRelativeTo != null
? positionRelativeTo : suggestBox);
Your implementation could also use a PopupPanel but with a setPostion(x,y) and show() instead of showRelativeTo.
Related
I am working on AEM Classic UI and I want to add a checkbox widget inside dialouge and to add a tooltip on it. Is that possible to add a tooltip or on mouse hover text inside dialogue on cq widgets? If possible, how can we implement it?
I found the solution.
The answer is NO. We can't implement direct tooltip inside dialogue box.
But we can implement a short text that works like tooltip.
eg:
feildLabel = <p title="Trust me! I am tooltip!!">Hover over me</p>
Note: In the above example, the tooltip text will appear only if we place the mouse over the base text for more then 1 second. There is an delay for a second.
We can implement tooltip in classic UI. Here below I gave the node structure to implement that.
Node Structure:
=> nt:unstructured
=> tooltip
jcr:primaryType = nt:unstructured
autoHide = true(Boolean)
title = title for tooltip
text = text for tooltip
I am looking for tooltip/widget/popup panel like this one
Any idea for such tooltip in GWT ?? I tried ballon widget in gwt,but that does not help me,i need a tooltip like the one above that should also be selectable!
PopupPanel is certainly your best start. PopupPanel will get you an undecorated square box like your example, with user interaction.
Depending on your design requirements you can setup the content with straight HTML (embed an HTMLPanel, with the HTML as contents, inside a PopupPanel), or lay it out using the GWT layout tool.
Also look over: DecoratedPopupPanel for some ideas about decorating the border of your panel with css rules. This may help with the little triangle pointer at the top.
One more hint: you might end up embedding a FocusPanel in your PopupPanel if you need to track events outside specific GUI elements.
I'm tasked with creating a mouseover with an ellipsis that extends the missing characters from a field. I started looking at the api's and I narrowed it down to a popup panel or a dialog box. Which is better for this or is there another widget that would work better?
Thanks,
James
If it is just a mouseover (no clicking) then a popup would probably be a more better choice. Check out UIObject#setTitle()
I'm trying to build a website similar to kayak.com, at least with respect to how it displays and filters results. I'm using GWT and have built a Composite widget which uses a CellList to display the results.
I'm not happy with how the cells are selectable. I've tried setting the SelectionModel of the CellList to an instance of NoSelectionModel, but that doesn't seem to work. Really, I just want to display some text and a few hyperlinks in each cell and only give the user visual feedback (change the mouse pointer, etc.) when the mouse is over a hyperlink.
See if this works for you:
http://groups.google.com/group/google-web-toolkit/browse_thread/thread/2327336e09ab29d1
Use
cellList.setKeyboardSelectionPolicy(KeyboardSelectionPolicy.DISABLED);
to disable selection on a CellList.
once again I've got a question. Since I am using Google Web Toolkit (GWT) at work (along with Java Servlets), I am currently building some user interface with GWT (in Java).
I've got some trouble though. I am using a SplitLayoutPanel which contains a ScrollPanel on the left and another one on the right.
In the left ScrollPanel there's a VerticalPanel with several Labels, which differ in their width. What I want to accomplish, is: if the Label's text doesn't fit in one line, it should display as many characters as possible and have a "..." in the end, if it's not fully displayed.
I am about to add a CustomEvent EventHandler for the Label, which can be fired whenever the Label needs to change its content. Now the problem however is, that I'd need to fire the event whenever the ScrollPanel or its inner VerticalPanel is resized (by dragging the SplitLayoutPanel-Splitter).
Now the question: is it possible to override some sort of "onResize"-Event or at least "onMouseMove"-Event inside the VerticalPanel, so that I could fire the "changeLabelSize()"-method for each Label inside of this VerticalPanel?
How would I go about it? Thank you all for your time in advance! Please ask for anything unclear, so I can clarify it.
Best regards,
Igor.
This can be done easily with the CSS property text-overflow: ellipsis;.
Supported by IE7-, Safari and Konqueror.
And it can be emulated in Firefox.