Jump to content

WidgetVBox and WidgetHBox border


photo

Recommended Posts

Hello

 

 

I play around with the WidgetVBox and WidgetHBox elements.

In my use case there is already a sprite as background and for separating the elements (WidgetIcons in a WidgetGroupBox).

 

I now trying to remove the 1 px border for the Box elements, but I can't find any method for this in the documentation.

Is there a way to remove this border?

 

 

Kind regards

Manuel

Link to comment

Try the following way after gui is loaded from ui file: call the Widget::arrange() function which visually re-arranges the widget and its children to lay them out neatly

Link to comment

Try the following way after gui is loaded from ui file: call the Widget::arrange() function which visually re-arranges the widget and its children to lay them out neatly

 

Hi extaliones

 

 

Thanks for the tip, but is does not work:

 

WidgetHBox with WidgetGroupBox as child and sprite as background (child from gui):

post-31-022952400 1286210100_thumb.png

 

WidgetHBox with WidgetGroupBox as child without sprite:

post-31-088944600 1286210171_thumb.png

 

 

Edit:

The border is linked somehow with the WidgetGroupBox, not the WidgetHBox sorry.

 

 

Kind Regards

Manuel

Link to comment

Hi extaliones

 

 

Thanks for the tip, but is does not work:

 

WidgetHBox with WidgetGroupBox as child and sprite as background (child from gui):

post-31-022952400 1286210100_thumb.png

 

WidgetHBox with WidgetGroupBox as child without sprite:

post-31-088944600 1286210171_thumb.png

 

 

Edit:

The border is linked somehow with the WidgetGroupBox, not the WidgetHBox sorry.

 

 

Kind Regards

Manuel

 

A WidgetGroupBox is more or less a WidgetVBox that draws a border around itself. you can modify how that border looks by modifying the png files in data/core/gui or if you don't want a border at all - just use WidgetVBox

  • Like 1
Link to comment

It is a visual element (like border) of WidgetGroupBox to disable this visual use the following method WidgetGroupBox::setBackground(0). Or you can add skin layout for border, please, the following documentation:

Programming/ GUI/Skin Layout

Link to comment

A WidgetGroupBox is more or less a WidgetVBox that draws a border around itself. you can modify how that border looks by modifying the png files in data/core/gui or if you don't want a border at all - just use WidgetVBox

 

Thanks, I didn't realized that, I switched now to a WidgetVBox.

 

 

It is a visual element (like border) of WidgetGroupBox to disable this visual use the following method WidgetGroupBox::setBackground(0). Or you can add skin layout for border, please, the following documentation:

Programming/ GUI/Skin Layout

 

Thanks, but WidgetGroupBox::setBackground(0) has no effect:

 

 Gui gui;
 gui = engine.getGui();

 WidgetGroupBox testBox;

 testBox = new WidgetGroupBox(gui);
 testBox.setWidth(200);
 testBox.setHeight(200);
 testBox.setBackground(0); 

 gui.addChild(testBox, GUI_ALIGN_OVERLAP);

 

But I now understand the border and how to change the png for it, thanks a lot! (and sorry, I totally over read this documentation part)

Link to comment
×
×
  • Create New...