[SOLVED] Editbox and scrollbar

Arkada

24-03-2012 23:14:25

HI everyone ! 8)

Is there a special way to activate scrollbars on an Editbox in MyGui ?

Cause i would like to create a multiline editbox with scrollbars who appears when the text exceed the size of the editbox.

I've successfull create the multiline editbox using code, not with xml file, but the scrollbars never appears.

Here is the way i create the widget :


this->historyBox = this->mainWindow->createWidget<MyGUI::EditBox>("EditBox",0,0,width - 8,height - 60,MyGUI::Align::Stretch,"historyBox");

this->historyBox->setEditReadOnly(true);
this->historyBox->setEditMultiLine(true);
this->historyBox->setVisibleVScroll(true);
this->historyBox->setTextAlign(MyGUI::Align::Top | MyGUI::Align::Left);
this->historyBox->setOverflowToTheLeft(true);
this->historyBox->setTextShadow(true);


Is someone has an idea ?

Greetings,

Gouwi

scrawl

27-03-2012 21:04:14

The skin you are using should have scrollbar sub-widgets. I think you should be using "EditBoxStretch" instead of "EditBox".

this->historyBox = this->mainWindow->createWidget<MyGUI::EditBox>("EditBoxStretch",0,0,width - 8,height - 60,MyGUI::Align::Stretch,"historyBox");


good luck

Altren

28-03-2012 12:26:28

Yeah, as scrawl said - you need to have scrollbars in your skin. And the only such skin that is included in default MyGUI skins set is EditBoxStretch.

Arkada

28-03-2012 12:29:30

Thank you scrawl ! 8)

It works perfectly now !