I’m trying to switch my application from mixing GWT and SmartGWT, so a few areas are being updated, one being the core layout.
I have gotten some changes adjusted, but I’m having trouble getting the Canvas items to appear in their appropriate place.
I have a VLayout defined similar to
vlayout.addMember(Img)
vlayout.addMember(hlayout);
vlayout.addMember(label);
Where Img is a header image, and hlayout consists of
hlayout.addMember(navigation);
hlayout.addMember(content_wrapper);
Where navigation extends SectionStack and content_wrapper is a Canvas. I then use content_wrapper.addChild(weekly_widget) to add a weekly_widget to the canvas. WeeklyWidget extends Canvas.
Everything seems to be drawn, but some of it is drawn at position 0, 0.
content_wrapper gets drawn at 200, 125. But the canvas added to content_wrapper gets drawn at 0, 0. I want it to start at 200, 125. Essentially, content_wrapper is a replacement for SimplePanel from GWT. I want it to be a container where I can place other things, and I want those things to be drawn wherever the container is, in this case, with the top-left corner at 200, 125. But instead, the container is placed at 200, 125 (content_wrapper), but the children of content_wrapper are placed at 0, 0.
Any suggestions as to what I am doing wrong? Is there something better to use than Canvas content_wrapper as a replacement for SimplePanel? The content_wrapper only needs one thing in it at a time - I used to use SimplePanel.setWidget(). With canvas, assuming I get it working, I think I would also have to figure out how to remove all children, then add a child again to achieve the same effect.