I need some advice with setting a layout.
I have a textfield and i would like to attach a slider to its east boarder. I would like to reuse the construct. Thus I have a class that extends textfield. I call that new class like
ViewField vF = new ViewField("Test",id, "OSG"); guiNode.attachChild(vF);
In this class I call
layout = new BorderLayout(); this.getControl(GuiControl.class).setLayout(layout); layout.addChild(slidervert, BorderLayout.Position.East);
unfortunately the result looks like this
even if I change the code to
SpringGridLayout layout2 = new SpringGridLayout( Axis.X, Axis.Y, FillMode.None, FillMode.None); this.getControl(GuiControl.class).setLayout(layout2); layout2.addChild(0,2,slidervert);
I am getting the same result.
I know if i would do something like
SpringGridLayout layout3 = new SpringGridLayout( Axis.X, Axis.Y, FillMode.None, FillMode.None); layout3.addChild(0,1,this); layout3.addChild(0,2,slidervert); Container con= new Container(layout3); lGuiNode.attachChild(con);
it might work, but I dont like to create a Container as I have no GuiNode inside my class and I may loose all the functionality of textfield if i hand over the container.
So my question is - how can I make the slider be attached to the side of textfield and not still inside textfield? I have tried with an inset but it did not work for me.
I have used the same approach to attach a horizontal slider to listbox (by copying from the vertical slider) and wonder why it is not working here.
edit: wrong category