OSDN Git Service

6cd419a29f2fe25dc196e9172cc41bf1169a3527
[ring-lang-081/ring.git] / applications / build / ja-jp / rnote / rnotetabwidth.ring
1 # Ring ノートパットアプリケーション (RNote)
2 # 原作者 : Mahmoud Fayed <msfclipper@yahoo.com>
3
4 class RNoteTabWidth
5
6         func TabWidth
7                 oInput = New QInputDialog(win1)
8                 {
9                         setwindowtitle("タブ幅の設定")
10                         setgeometry(100,100,400,50)
11                         setlabeltext("半角スペース換算")
12                         settextvalue("1")
13                         r = exec()
14                 }
15                 if r=0 return ok
16                 nTabSpaces = 0 + oInput.textvalue()
17                 SetTabSpaces()
18
19         func SetTabSpaces
20                 oTFont.fromstring(cFont)
21                 oFontMetrics = new QFontMetrics(oTFont)
22                 nSpaceWidth = oFontMetrics.Width(" ",1)
23                 textedit1.setTabStopWidth(nTabSpaces*nSpaceWidth)