tags:

views:

237

answers:

3

Is it possible to change the length of the TAB (\t) character (currently 8 characters) displayed in a XUL <textbox> element ?

Note that I want to avoid replacing TABs with spaces.

+1  A: 

Not an expert of XUL, but I would say no. From the docs

https://developer.mozilla.org/en/XUL/textbox

I see no property to set this, nor any setting in the firefox about:config.

Stefano Borini
Also I would suspect that it's system specific.
lithorus
+4  A: 

The CSS 2.1 spec specifies tabs be rendered as the width of 8 spaces. (Spec) I don't see any mozilla specific CSS to override that value.

Jared314
+1  A: 

Dug through the source for this. It appears that this is hard coded to 8 characters within the layout engine itself.

http://mxr.mozilla.org/mozilla1.9.2/source/layout/generic/nsTextFrameThebes.cpp#2483

Looks like tab replacement is the only option if tab-stop rendering is necessary :(

Kevin Decker