Example #1
0
BOOL LLFloaterPostcard::postBuild()
{
	childSetAction("cancel_btn", onClickCancel, this);
	childSetAction("send_btn", onClickSend, this);

	childDisable("from_form");
	childSetAction("publish_help_btn", onClickPublishHelp, this);

	if (gAgent.isTeen())
	{
		// Disable these buttons if they are PG (Teen) users
		childDisable("allow_publish_check");
		childHide("allow_publish_check");
		childDisable("publish_help_btn");
		childHide("publish_help_btn");
		childDisable("mature_check");
		childHide("mature_check");
	}
	
	LLString name_string;
	gAgent.buildFullname(name_string);
	
	childSetValue("name_form", LLSD(name_string));

	LLTextEditor *MsgField = LLUICtrlFactory::getTextEditorByName(this, "msg_form");
	if (MsgField)
	{
		MsgField->setWordWrap(TRUE);

		// For the first time a user focusess to .the msg box, all text will be selected.
		MsgField->setFocusChangedCallback(onMsgFormFocusRecieved, this);
	}
	
	childSetFocus("to_form", TRUE);

    return TRUE;
}
BOOL LLFloaterPostcard::postBuild()
{
	childSetAction("cancel_btn", onClickCancel, this);
	childSetAction("send_btn", onClickSend, this);

	childDisable("from_form");

	std::string name_string;
	gAgent.buildFullname(name_string);
	childSetValue("name_form", LLSD(name_string));

	LLTextEditor* MsgField = getChild<LLTextEditor>("msg_form");
	if (MsgField)
	{
		MsgField->setWordWrap(TRUE);

		// For the first time a user focusess to .the msg box, all text will be selected.
		MsgField->setFocusChangedCallback(onMsgFormFocusRecieved, this);
	}
	
	childSetFocus("to_form", TRUE);

    return TRUE;
}