Beginner: various questions (widgets, ...)

Templarc

26-11-2009 15:25:35

Hi!
I just started to use QuickGUI, so I have a lot of questions... mainly because I'm not always able to find answers on the forum...

I will start with my first questions, and I think will add some latter on when I face a problem.

1 : I understood that the appearance depends on the loaded skin. Anyway, is it possible with the default skin to modify the thickness of the border of a panel. I have a textarea and a button that I want to put in the same panel, but in that case two borders appear (so I want to remove the border of the panel), while keeping the two objects in the same panel (this way when I hide the panel everything is hidden). Is it possible ?

Calder

29-11-2009 18:06:34

I'm guessing KungFooMasta is on vacation, as posts usually don't make it 12 hours without a reply from him. :D

Sorry I can't be of any help here. I'll give the documentation a look and see if I can figure anything out, but I think our best bet is just to wait for KFM to get back.

EDIT: Panel is a child of ContainerWidget, ComponentWidget, and Widget which all implement a method setSkinType() method. This allows you to create a different panel skin named "invisiblepanel" or something that wouldn't have any border or background. Then you could use

Panel* panel = blablabla;
panel->setSkinType("invisiblepanel");

to create one. Hope this helps!

kungfoomasta

30-11-2009 21:13:19

Yep I was on thanksgiving vacation. :)
Thanks for the kind words Calder.

You can achieve what you want by creating a skin for your panel, with border thickness of 0 for each side:


Panel borderless
{
SkinReference hscrollbar
{
ClassName HScrollBar
SkinType default
}

SkinReference vscrollbar
{
ClassName VScrollBar
SkinType default
}

SkinElement background
{
Border_Bottom 0
Border_Left 0
Border_Right 0
Border_Top 0
Texture qgui.panel.png
TileBackground true
TileBorders true
}

}


Then make sure to use this skin for the panel:

myPanel->setSkinType("borderless");

(setSkinType might not be the correct API name, I'm a little rusty right now)

Templarc

01-12-2009 17:09:14

Thanks for the reply, it works fine.
Just had to remove "Texture qgui.panel.png " otherwise the result is quite strange with the given Texture :p