I am creating a ContentPanel with BorderLayouts in gxt.
Need to set auto width and height for panel. setAutowidth() works properly but setAutoHeight() doesn't.
So, what should I implement to make my ContentPanel autoHeighed?
You can use this
container.setHeight("auto");
It worked for me.
There is another option. You can also try this
container.setStyleAttribute("height","auto !important");
container.setStyleAttribute("overflow","visible !important");
Related
I've tried so many examples, and I couldn't do Toolbar work with a DrawerLayout.
Can anywone fix the example above, and show me in rnplay how does it work?
This is an example of what I tried to do.
https://rnplay.org/apps/telLVQ
Thank you.
Try setting a height to your . Also set styles to your view to fill the screen.
https://github.com/facebook/react-native/issues/7915
I tried adding a sliderbar using http://code.google.com/p/gwt-slider-bar/ code to a TabLayoutPanel but the sliderbar is not displayed even if it works well on a DeckPanel.
Have anyone succed to do the same thing with this code or using another alternative?
I found a better way to make a sliderbar in a TabLayoutPannel using the class http://code.google.com/p/listwidget/source/browse/trunk/web/src/main/java/com/google/gwt/gen2/#gen2%2Fclient with the CSS and gifs available in the same directory.
I hope this will be helpful
I am facing a problem that I can't see the drop down list of the GWT Suggestbox.
I am adding a GWT Suggestbox into SmartGWT's VLayout. Then I can see the textbox of the Suggestbox. But when I input some data, I can't see the suggestions provided.
Is this because I am using the SmartGWT VLayout? Could anyone tell me how to solve it? Thanks.
Sorry, the above question is not clear enough. What I mean is I add a SuggestBox into a layout with small height. Then I can see the the SuggestBox's TextBox part and part of the suggestion and the rest of the suggestion seems hide under other layout. Below is my code:
VLayout mainLayout = new VLayout();
mainLayout.setHeight100();
mainLayout.setWidth100();
MultiWordSuggestOracle oracle = new MultiWordSuggestOracle();
oracle.add("a");
oracle.add("aa");
oracle.add("aaa");
oracle.add("aaaa");
oracle.add("aaaaa");
oracle.add("aaaaaa");
oracle.add("aaaaaaa");
SuggestBox box = new SuggestBox(oracle, new TextBox());
VLayout suggestBoxLayout = new VLayout();
suggestBoxLayout.setHeight("10%");
suggestBoxLayout.addMember(box);
VLayout body = new VLayout();
body.setBackgroundColor("#3B5998");
body.setHeight("90%");
mainLayout.addMember(body);
mainLayout.addMember(suggestBoxLayout);
So when I enter a into the SuggestBox, I can only see a, aa, aaa and the rest suggestions are hide by the body.
This may be zIndex related, but there's no reason to use GWT's SuggestBox and run into problems like this. Use SmartGWT's ComboBoxItem. If you don't want a drop-down control to appear at the end of the text entry area, call setShowPickerIcon(false).
With the help from Alain, I add .gwt-SuggestBoxPopup {z-index: 1000000;} into my CSS. Then I solve the problem.
It would be easier with little bit of code.
Before stopping to mix Smartgwt with Gwt I integrated some code which was using GWt suggestBox and it was working....
(Why don't you use the Smartgwt selectitem it does the job?)
Regards
Alain
I'd like PopupPanel centred in the screen calling the center() method. It is placed incorrectly the first time I load it. All subsequent times, it centers just fine.
It seems like the styles contained in < ui:style> aren't being injected. I've tried creating an interface to the style in the View (per GWT docs) and calling ensureInjected() in the constructor but this has no effect.
How to have consistent centering?
There is a defect which is said to be fixed in GWT 2.5. For me the issue still exists in 2.5, and for my situation the fix was to set width and height of the panel explicitly:
popup.setWidth("800px");
popup.setHeight("700px");
For me, this works with the following simple snippet (tested on Firefox 3.6 and Chrome 10.0):
#Override
public void onModuleLoad() {
final PopupPanel popupPanel = new PopupPanel();
popupPanel.center();
}
Are you doing something differently?
In GXT, I've got a control with an important panel added to the bottom component, basically like this:
public class SamplePanel extends ContentPanel {
ContentPanel panel = new ContentPanel();
public SamplePanel() {
setBottomComponent(panel);
}
public void setVisible(boolean isVisible) {
panel.setVisible(isVisible);
}
The panel is being set as the "bottom component" because it needs to stay at the bottom of the widget and viewable at all times.
The problem is, while the visibility of the panel toggles correctly, the 'bottom component' area doesn't resize to become smaller and fit the new dimensions of the bottom area.
However, I've noticed that the bottom area does resize when I manually change the size of the widget with the mouse.
Is there any way to programatically force a redraw/repaint/re-layout... anything to have the bottom component change to reflect the new size of its contents?
I've tried all of these and they don't work:
public void setVisibility(boolean isVisible) {
panel.setVisible(isVisible);
doLayout(true);
recalculate();
repaint();
}
Thanks
In the last gxt you can do.
this.layout(true);
Otherwise you can fire an Events.Resize event.
I don't know about GXT, but in GWT I would use one of the force() or forceLayout() methods on my panel. Perhaps there is a similar API for doing that!
HTH.
Have you tried using the setLayoutOnChange() method of the ConentPanel?
I would suggest looking at this:
http://davidmaddison.blogspot.com/2008/12/gwt-rendering-process.html
What you can try to do is addListeners to the Panel and try calling panel.layout() there
This post claims that the top and bottom components to not participate in layout once the panel has been rendered and suggests a manual workaround (using RowLayout) or manually setting the size of the panel.
Consider finding the sizes from the parent and calling onResize(width, height)