Even if I seem to talk alone (one my favorite occupations

) ... i post again.
I finally tried a third method to have a textbox : a statictext with border behind an editbox of the same dimensions and hidden (ransparent font and no border).
This is the code :
Code: Select all
class TextBox
{
IGUIEnvironment * env;
IGUIStaticText * TextBoxShown;
IGUIEditBox * TextBoxImpl;
public:
TextBox(IGUIEnvironment*, const wchar_t*, const core::rect<s32>&, bool, IGUIElement*, s32, s32, s32);
void update();
};
TextBox::TextBox(IGUIEnvironment* _env, const wchar_t* IniText, const core::rect<s32>& rectangle, bool border, IGUIElement* parent, s32 id, s32 id2, s32 maxLength)
{
env = _env;
TextBoxShown = env->addStaticText(IniText, rectangle, border, true, parent, id);
TextBoxImpl = env->addEditBox(IniText, rectangle, true, parent, id2);
TextBoxImpl->setOverrideColor(SColor(0,0,0,0));
TextBoxImpl->setMax(maxLength);
}
void TextBox::update()
{
TextBoxShown->setText(TextBoxImpl->getText());
}
So, I have juste to create the Textbox :
TextBox MytextBox(env, L"", rect<s32>(200,200,600,400), true, 0, 15, 16, 255);
And to update it at each drawing :
MytextBox.update();