Is there setFocus() function?
by BMiuritan · in Torque Game Engine · 06/14/2006 (2:06 am) · 2 replies
Hi all,
Is there a setFocus() for objects like TextEditCtrl, ButtonCtrl? If no, so how can I do it?
Thank you very much
Is there a setFocus() for objects like TextEditCtrl, ButtonCtrl? If no, so how can I do it?
Thank you very much
About the author
#2
About the setFirstResponder, loseFirstResponder, I did like this:
new GuiControl(testGui1) {
Profile = "GuiModelessDialogProfile";
HorizSizing = "right";
VertSizing = "bottom";
position = "0 0";
Extent = "640 480";
MinExtent = "8 2";
Visible = "1";
Modal = "1";
new GuiBitmapBorderCtrl() {
Profile = "GuiDefaultProfile";
HorizSizing = "right";
VertSizing = "bottom";
position = "0 0";
Extent = "218 285";
MinExtent = "8 2";
Visible = "1";
new GuiTextEditCtrl(text1st) {
Profile = "GuiTextEditProfile";
HorizSizing = "right";
VertSizing = "bottom";
position = "46 36";
Extent = "111 18";
MinExtent = "8 2";
Visible = "1";
lockMouse = "0";
maxLength = "255";
historySize = "0";
password = "0";
tabComplete = "0";
sinkAllKeyEvents = "0";
password = "0";
passwordMask = "*";
};
new GuiTextEditCtrl(text2nd) {
Profile = "GuiTextEditProfile";
HorizSizing = "right";
VertSizing = "bottom";
position = "49 64";
Extent = "112 18";
MinExtent = "8 2";
Visible = "1";
SetFirstResponder = "1";
lockMouse = "0";
maxLength = "255";
historySize = "0";
password = "0";
tabComplete = "0";
sinkAllKeyEvents = "0";
password = "0";
passwordMask = "*";
};
new GuiTextEditCtrl(text3rd) {
Profile = "GuiTextEditProfile";
HorizSizing = "right";
VertSizing = "bottom";
position = "49 109";
Extent = "127 18";
MinExtent = "8 2";
Visible = "1";
lockMouse = "0";
maxLength = "255";
historySize = "0";
password = "0";
tabComplete = "0";
sinkAllKeyEvents = "0";
password = "0";
passwordMask = "*";
};
Can you show me where I'm wrong?
Thanks
06/24/2006 (3:43 am)
There are 3 textEditCtrls in my Gui and to key-in something in the 2nd textEditCtrl, I have to click on it. So is there another way to do instead of mouse click?About the setFirstResponder, loseFirstResponder, I did like this:
new GuiControl(testGui1) {
Profile = "GuiModelessDialogProfile";
HorizSizing = "right";
VertSizing = "bottom";
position = "0 0";
Extent = "640 480";
MinExtent = "8 2";
Visible = "1";
Modal = "1";
new GuiBitmapBorderCtrl() {
Profile = "GuiDefaultProfile";
HorizSizing = "right";
VertSizing = "bottom";
position = "0 0";
Extent = "218 285";
MinExtent = "8 2";
Visible = "1";
new GuiTextEditCtrl(text1st) {
Profile = "GuiTextEditProfile";
HorizSizing = "right";
VertSizing = "bottom";
position = "46 36";
Extent = "111 18";
MinExtent = "8 2";
Visible = "1";
lockMouse = "0";
maxLength = "255";
historySize = "0";
password = "0";
tabComplete = "0";
sinkAllKeyEvents = "0";
password = "0";
passwordMask = "*";
};
new GuiTextEditCtrl(text2nd) {
Profile = "GuiTextEditProfile";
HorizSizing = "right";
VertSizing = "bottom";
position = "49 64";
Extent = "112 18";
MinExtent = "8 2";
Visible = "1";
SetFirstResponder = "1";
lockMouse = "0";
maxLength = "255";
historySize = "0";
password = "0";
tabComplete = "0";
sinkAllKeyEvents = "0";
password = "0";
passwordMask = "*";
};
new GuiTextEditCtrl(text3rd) {
Profile = "GuiTextEditProfile";
HorizSizing = "right";
VertSizing = "bottom";
position = "49 109";
Extent = "127 18";
MinExtent = "8 2";
Visible = "1";
lockMouse = "0";
maxLength = "255";
historySize = "0";
password = "0";
tabComplete = "0";
sinkAllKeyEvents = "0";
password = "0";
passwordMask = "*";
};
Can you show me where I'm wrong?
Thanks
Torque Owner Stefan Lundmark