Hi Patrick,
thank you very much! This works!
I did several things differently:
I used this.getOffsetWidth/Height instead of
this.getParent().getOffsetWidth/Height
And I also used setHeigth instead of setWidgetSize
So for now I have a working solution.
One thing is noticeable: The widget, the
I didn't look that close at it but maybe you should use the parent element's
client width and height instead?
--
You received this message because you are subscribed to the Google Groups
Google Web Toolkit group.
To unsubscribe from this group and stop receiving emails from it, send an email
Also, you might want to put the resize in a timer or deferred command when
called from onResize().
--
You received this message because you are subscribed to the Google Groups
Google Web Toolkit group.
To unsubscribe from this group and stop receiving emails from it, send an email
to
I took your PortalPanel class above and added it to the page using
RootLayoutPanel.get().add(Widget)
This is what it took to get your widgets sizing properly:
public void resetSplitters () {
// parent height
int ph = this.getParent().getOffsetHeight();
// parent width
int pw =
Hi Patrick,
nothing happens. What am I doing wrong?
Magnus
-
public class PortalPanel extends Composite implements RequiresResize
{
private static PortalPanelUiBinder uiBinder = GWT.create
(PortalPanelUiBinder.class);
@UiField SplitLayoutPanel slp_Outer;
@UiField SplitLayoutPanel
Try add a docklayoutPanel outside.
2013/12/16 Magnus alpineblas...@gmail.com
Hi Patrick,
nothing happens. What am I doing wrong?
Magnus
-
public class PortalPanel extends Composite implements RequiresResize
{
private static PortalPanelUiBinder uiBinder = GWT.create
I'm pretty sure your problem is above PortalPanel. I will try to put all
of the pieces together tonight.
On Monday, December 16, 2013 11:49:50 AM UTC-5, Magnus wrote:
Hi Patrick,
nothing happens. What am I doing wrong?
Magnus
-
public class PortalPanel extends Composite implements
To move the splitter, you have to change the size of its associated widget.
--
You received this message because you are subscribed to the Google Groups
Google Web Toolkit group.
To unsubscribe from this group and stop receiving emails from it, send an email
to
public void resetSplitters ()
{
int ys = this.getOffsetHeight ();
Window.alert (h: + ys); // - 0
}
@Override
protected void onLoad()
{
super.onLoad ();
resetSplitters ();
}
--
You received this message because you are subscribed to the Google Groups
Google Web Toolkit group.
Hi,
I found that implementing RequiresResize and overriding onResize produces a
non zero width/height. So this could be a solution for the right place to
reposition the splitters.
But there is no method to actually reposition the splitters. I found that
this has been addressed in several
Hi Patrick,
thanks, but it didn't help.
I call the resize method from within onAttach, but the value is still 0
(see below).
Magnus
public void resetSplitters ()
{
int ys = this.getOffsetHeight ();
Window.alert (h: + ys);
}
@Override
protected void onAttach()
{
Just a hunch--I've not tried this--maybe you should instead override
onLoad().
From the Javadocs:
onAttach: It is strongly recommended that you override
onLoad()http://localhost/~thad/gwt/doc/javadoc/com/google/gwt/user/client/ui/Widget.html#onLoad()
or
Hi Thad,
I have also tried to override onLoad, but getIOffsetHeight returns 0...
Magnus
--
You received this message because you are subscribed to the Google Groups
Google Web Toolkit group.
To unsubscribe from this group and stop receiving emails from it, send an email
to
Hi,
as happened so often: While preparing a minimal code example I found the
problem myself: My SplitLayoutPanel was not inserted into the surrounding
DockLayoutPanel directly. There was a ScrollPanel between, so that the
south part of my SplitLayoutPanel was sized to 0. I don't know why, but
That is what I was going to recommend but I haven't had time to sit down and
look at all the code you provided. Glad you were able to figure it out though.
Instead of resizing in your constructor, try overriding onAttach and call the
resize function in there. Make sure you call
Hi Patrick,
I cannot resize the panel yet, because even if I do not change any sizes,
it is not displayed correctly.
If I create the panel based on the UIBinder code below and add it to the
center of a surrounding DockLayoutPanel, the bottom part main is not
visible. When inspecting it with
Can you provide code for the java side?
Also, I'm pretty sure SplitLayoutPanel only works in pixels.
--
You received this message because you are subscribed to the Google Groups
Google Web Toolkit group.
To unsubscribe from this group and stop receiving emails from it, send an email
to
Hi Patrick!
Can you provide code for the java side?
It's a little bit difficult to extract the relevant code...
The root panel is a class called Display derived from DockLayoutPanel.
There is one method called setClient that sets the current client panel.
All client panels are derived from a
If its parent is already attached, you can just ask it how wide it is.
--
You received this message because you are subscribed to the Google Groups
Google Web Toolkit group.
To unsubscribe from this group and stop receiving emails from it, send an email
to
Pleasr provide some code. You just have to make sure the parent and its
parents are added before you ask.
--
You received this message because you are subscribed to the Google Groups
Google Web Toolkit group.
To unsubscribe from this group and stop receiving emails from it, send an email
to
SplitLayoutPanel does not do percentages so you will have to calculate the
center in pixels.
On Friday, December 6, 2013 12:31:17 AM UTC-5, Magnus wrote:
Hi,
I would like a panel with split bars like this:
+++
||
Hi,
this means, I cannot do it in a declarative way?
So whenever the form is displayed, compute the pixel values and set them
manually?
But I remember that when fetching the sizes of a panel on creation / within
the constructor the size values often are 0.
How can I compute them?
How would
Hi,
I would like a panel with split bars like this:
+++
|||
| west | east |
|||
+++
|
23 matches
Mail list logo