0

Is there a way to set the number of spaces shown for a tab? (tab as in a tab character)

I've made an editor using a StyledEditorKit and StyledDocument, but tabs give more spaces than I would prefer.

2
Contributors
3
Replies
5
Views
11 Years
Discussion Span
Last Post by Phaelax
0

Hmm, I'm not sure how to do that.

Although, when I was writing a password program, I needed to output '*' instead of letters when the user was inputing their password.

So I guess you could do something similiar for the tab key.

Such as:

if char = '\t'  //tab character?
  then print "   " //set defaults spaces here
 end if

Although that's incredibly hackish, there may be a better solution?

Edited by Dani: Formatting fixed

0

I've taken a look at it, though I don't see a way of implementing it with a styled document

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.