Is there a way hide and show a TabLayoutPanel, so the titles disappear?
I think that I can use CSS and set the property visibility but how to set an id for the titles' tabs without its content?
In fact TabPanel is a combination of TabBar and DeckPanel - try to go this way, you can combine it manually and have a control on both parts.
What you describe sounds like a DeckPanel : a TabPanel without the titles
Related
I have a HorizontalPanel and I added two Buttons to it.
The HorizontalPanel is already as wide as its parent.
I want each Button to take a half of the HorizontalPanel. How can I do it programmatically?
Or maybe am I using the wrong panel? Any advice would be appreciated.
I tried setWidth("50%"). It looks strange. I also tried other panels e.g. FlowPanel. I just cannot figure it out...
Use setWidth("100%") instead of setWidth("50%") for both the Buttons and then add it to HorizontalPanel.
I am using the GWT to build the radio button , but when i display it shows one after another (in row).
Is there any way to stack the radio buttons in the group vertically?
It depends on the Panel you are adding it to. If you want things to line up vertically without any hassle, add each radio button to a VerticalPanel.
The reason it lines up is because GWT generates RadioButtons as HTML <span> elements, which by default has the CSS display set to inline.
If you prefer not to use a VerticalPanel, you can make RadioButtons have display:block;
One way is to wrap each RadioButton in a SimplePanel.
Another way is to set their display css attribute to block.
GWT RadioButton has a default provided CSS class for styling the RadioButton gwt-RadioButton
Example :
.gwt-RadioButton
{
display : block;
}
My app has a need to store many Panel dynamically. So TabPanel is the suitable choice. However, TabPanel only works in Quirks Mode, it can also work in Standards Mode but with some Quirks, ex, when u click a link put inside a TabPanel then there is a small shaking appeared. But TabPanel is pretty simple, not heavy & easy to code.
I am not sure if i put link into a HTMLpanel & then put that HTMLPanel into that TabPanel then the shaking problem will be solved or not?
Some others say do not use TabPanel cos its behavor is unpredictable in many different webbrowsers since it support only Quirks Mode. They prefers to use TabLayoutPanel. Ok, TabLayoutPanel is very stable solid, but it is quite complicated, it must be put into the RootLayoutPanel. If I don't put it into RootLayoutPanel, then i have to set its fixed width & height (ex: 600px 300px) to be able to see it in Non-root presenters. But I want its height + width to stretch out to 100%. Some peopl have problems with TabLayoutPanel so they have to switch to TabPanel but TabPanel may be deprecated in the future.
So, some suggest me to use custom TabPanel using TabBar + DeckLayoutPanel, but i couldn't find any UiBinder guide for how to use TabBar + DeckLayoutPanel to make custom TabPanel.
If u have to use Tab in ur app (in respect to the above constraints, ie run smoothly in standards mode & not put into RootPanel) then which solution will u choose?
What approach is the best?
I use the TabLayoutPanel where possible.
When I need a tab panel that does not use the entire window or I want the tab contents to take just the side needed for the selected tab then I use a custom made TabPanel. That one is using the TabLayoutPanel for showing the tabs but the contents are put outside in a FlowPanel.
I need a scrollPanel with a verticalpanel and a tablayout panel inside it. Problem is, unless I specify the exact height of the tablayoutPanel, the tab content does not show. Any known fixes/ workarounds?
Not the answer you are looking for, but might spark an idea for another way to do this - what does it mean to scroll a tab panel? As soon as the user starts scrolling down, the tabs will no longer be visible to change tabs, user will always need to scroll all the way to the top to consider any other tab.
That said, any of the *LayoutPanel classes GWT has introduced that implement ProvidesResize, RequiresResize, etc need sizing to properly draw themselves and their content. This is why you are having the issue. These classes are designed to size their children, not to just consume as much space as those children require.
Closest I can suggest to a workaround (except for putting a ScrollPanel inside the TabLayoutPanel instead) would be to know the height of the current tab's contents, add to that the height of just the tabs themselves, and assign that as the height of the tabpanel. Not a very nice solution, but it might get you by.
I Am trying to create a Tab Panel where I can add and delete tabs on demand.
Where I am getting stuck is that if a potential user adds too many tabs the new tabs go off the screen.
Each Tab is to contain a text area widget where a user may enter text.
Is there any way of horizontally scrolling the just the TabBar and not the whole browser window?
I could use a scroll panel but I was hoping to scrol just the Tabs, not the panel contents.
I cannot see any available method in the com.google.gwt.user.client.ui.TabPanel API that will perform this function and no real way to split the panel.
Help!
It's not what you've asked for, but you might consider using a StackPanel instead of a TabPanel, since if the user can enter a long list of items it's generally better to have vertical scrolling instead of horizontal scrolling.
The gwt TabPanel isn't the greatest, and there's not a real easy way to do what you want. You could take a look at the tab widget in Ext-GWT, which scrolls the tabs, but I don't think extjs is generally a good idea.
There's a bunch of new layout-based widgets arriving with GWT 2.0. Look at TabLayoutPanel. It places tabs in a very wide container inside a div with overflow=hidden. You might be able to add some controls to scroll that container and get the effect you want.
Good luck, and report back if you get something working. GWT really needs more widget contributors.