Author Topic: Gui Ml Text Edit Profile, Tabbing?  (Read 1392 times)

I am trying to figure out a way so when i press Tab, it tabs like it would in let's say, notepad or some other text editor. I can't figure out a way to do this, anyone have any ideas?

I am trying to figure out a way so when i press Tab, it tabs like it would in let's say, notepad or some other text editor. I can't figure out a way to do this, anyone have any ideas?

Several people, including myself, have tried this to no avail.  As it turns out, when you hit tab in a gui ml text edit box, it does add a tab, but the text box does not show tabs.  I would reccommend you make an accelerator that instead simulates hitting the spacebar 5 times when the tab key is pressed.

Several people, including myself, have tried this to no avail.  As it turns out, when you hit tab in a gui ml text edit box, it does add a tab, but the text box does not show tabs.  I would reccommend you make an accelerator that instead simulates hitting the spacebar 5 times when the tab key is pressed.

Yeah I was thinking about that space bar method. But how does one check if the tab key is pressed, besides key-binding?

Yeah I was thinking about that space bar method. But how does one check if the tab key is pressed, besides key-binding?

In the box that says "accelerator"
type "TAB"
mission accomplished


Hmm, it seems to not be working.

         new GuiMLTextEditCtrl(igse_contents) {
            profile = "GuiMLTextEditProfile";
            horizSizing = "right";
            vertSizing = "bottom";
            position = "1 1";
            extent = "324 363";
            minExtent = "8 2";
            visible = "1";
            command = "SpaceAsTab();";
            accelerator = "TAB";
            lineSpacing = "2";
            allowColorChars = "0";
            maxChars = "-1";
            maxBitmapHeight = "-1";
            selectable = "1";
         };

post function spaceastab()

function spaceAsTab()
{
   error("SPAT");
}

check your case

spaceAsTab()
SpaceAsTab()

I'm pretty sure TS is case-sensitive, but it's been awhile so don't hold me to it

check your case

spaceAsTab()
SpaceAsTab()

I'm pretty sure TS is case-sensitive, but it's been awhile so don't hold me to it

It isn't, but occasionally you might find something that is case sensitive in torque, so I just like to do everyone with lowercase.

You would be better off defining a new actionmap which gets pushed when you open your ingame script editor gui, which then contains keybinds for tab/whatever else you want to bind, and then pops the actionmap when the gui closes.

Don't screw with accelerator/command - it wasn't made for this purpose.

You would be better off defining a new actionmap which gets pushed when you open your ingame script editor gui, which then contains keybinds for tab/whatever else you want to bind, and then pops the actionmap when the gui closes.

Don't screw with accelerator/command - it wasn't made for this purpose.

Lol I like how you know it's an in game script editor.

Anyways, I'm no good with GUI's, do you think you can provide a sample?

You would be better off defining a new actionmap which gets pushed when you open your ingame script editor gui, which then contains keybinds for tab/whatever else you want to bind, and then pops the actionmap when the gui closes.

Don't screw with accelerator/command - it wasn't made for this purpose.

Oh Ephi, always telling people what they're making before they make it.

from my experience in-game scripting breaks with tabs completely unless you just cut all the tabs out.

i think in this case it's more trouble than it's worth, but this forum isn't for giving opinions, now, it it?

from my experience in-game scripting breaks with tabs completely unless you just cut all the tabs out.

i think in this case it's more trouble than it's worth, but this forum isn't for giving opinions, now, it it?

I'll figure something out.