Game Development Community

GuiMLTextEditCtrl versus GuiTextEditCtrl

by Arthur Ogawa · in Torque Game Builder · 02/06/2007 (1:53 am) · 0 replies

My starting point is a working Gui with an edit text field, like so:
new GuiTextEditCtrl(typeEditText) {
   profile = "GuiTextEditProfile";
   horizSizing = "right";
   vertSizing = "bottom";
   horizSizing = "right";
   vertSizing  = "bottom";
   Position    = "860 150";
   extent      = "150 018";
   minExtent   = "008 002";
   visible = "1";
   maxLength = "255";
   historySize = "0";
   password = "0";
   tabComplete = "0";
   sinkAllKeyEvents = "0";
};
I decided to give the user the ability to type in multiple lines, so I replaced this with
new GuiScrollCtrl(chatEditTextScroll) {
   profile = "GuiScrollProfile";
   horizSizing = "right";
   vertSizing = "bottom";
   Position = "860 150";
   extent   = "150 090";
   minExtent = "8 2";
   visible = "1";
   willFirstRespond = "1";
   hScrollBar = "alwaysOff";
   vScrollBar = "alwaysOn";
   constantThumbHeight = "0";
   childMargin = "0 0";
   new GuiMLTextEditCtrl(typeEditText) {
      profile = "GuiMLTextProfile";
      horizSizing = "right";
      vertSizing = "bottom";
      Position = "2 2";
      extent = "128 18";
      minExtent = "8 2";
      visible = "1";
      maxLength = "255";
      historySize = "0";
      password = "0";
      tabComplete = "0";
      sinkAllKeyEvents = "0";
   };
};
But now the insertion point does not appear in the Gui, and consequently the user cannot type in anything.

So, I must be misusing GuiMLTextEditCtrl. Can anybody set me straight? I have searched all the tutorials and sample code I can find, but I do not see a single instance of GuiMLTextEditCtrl being used. So I am at a loss.

Any help will be gratefully appreciated!