Gryphon_de Posted September 16, 2011 Share Posted September 16, 2011 Hello! Could you please add this aligns for ui widgets? Case: I have widget with fixed height and flexible width. If I use align="expand", height is fixed no more( Link to comment
danni.coy Posted September 16, 2011 Share Posted September 16, 2011 My suggestion would be to use the HBox and VBox containers with align=expand. Children will only expand in one direction. Link to comment
Gryphon_de Posted September 19, 2011 Author Share Posted September 19, 2011 My suggestion would be to use the HBox and VBox containers with align=expand. Children will only expand in one direction. I am not sure I can use this advice in my case. I need to create some widget with 3 childrens: scrollbox (top) editline (bottom left) button (bottom right) Button size should be fixed; editline should have fixed height and flexible width. Editbox should take all the place that left. How can I do this? Link to comment
Gryphon_de Posted September 19, 2011 Author Share Posted September 19, 2011 I'm trying write .ui like this: <window> <vbox align="expand"> <scrollbox align="expand"/> <hbox height="40"> <editline align="expand"/> <button width="30"/> </hbox> </vbox> </window> In this case editline doesn't actually expand. If I add align="expand" property to hbox, it ignores the height limit (well, it takes 40 as minimum heights value, while I want it to be fixing). Link to comment
danni.coy Posted September 19, 2011 Share Posted September 19, 2011 try <window> <vbox align="expand"> <vbox> <scrollbox align="expand"> <hbox align="expand"> <editline align="expand"/> <button width="30"/> </hbox> </vbox> </vbox> </window> the double vbox is a trick I picked up from looking at the editor code. It would be nice if there was a less hacky way to do it. Link to comment
Gryphon_de Posted September 20, 2011 Author Share Posted September 20, 2011 try <window> <vbox align="expand"> <vbox> <scrollbox align="expand"> <hbox align="expand"> <editline align="expand"/> <button width="30"/> </hbox> </vbox> </vbox> </window> the double vbox is a trick I picked up from looking at the editor code. It would be nice if there was a less hacky way to do it. Then my editbox doesn't change its height either 8( Link to comment
danni.coy Posted September 21, 2011 Share Posted September 21, 2011 what about <window> <scrollbox align="expand"> </scrollbox> <vbox> <hbox align="expand"> <editline align="expand" /> <button width="30" /> </hbox> </vbox> </window> I don't see any harm in making a less hacky way of doing this then. Link to comment
Gryphon_de Posted September 21, 2011 Author Share Posted September 21, 2011 what about <window> <scrollbox align="expand"> </scrollbox> <vbox> <hbox align="expand"> <editline align="expand" /> <button width="30" /> </hbox> </vbox> </window> I don't see any harm in making a less hacky way of doing this then. Yay) It works, thank you very much!) Link to comment
Recommended Posts