OSDN Git Service

Ring 1.10 以来となる開発環境の日本語ローカライズ版 (評価版) を追加 (ノートパッド、フォームデザイナー、対話型実行環境、ファイルの検索)。
[ring-lang-081/ring.git] / applications / build / ja-jp / rnote / rnotetabwidth.ring
diff --git a/applications/build/ja-jp/rnote/rnotetabwidth.ring b/applications/build/ja-jp/rnote/rnotetabwidth.ring
new file mode 100644 (file)
index 0000000..6cd419a
--- /dev/null
@@ -0,0 +1,23 @@
+# Ring ノートパットアプリケーション (RNote)
+# 原作者 : Mahmoud Fayed <msfclipper@yahoo.com>
+
+class RNoteTabWidth
+
+       func TabWidth
+               oInput = New QInputDialog(win1)
+               {
+                       setwindowtitle("タブ幅の設定")
+                       setgeometry(100,100,400,50)
+                       setlabeltext("半角スペース換算")
+                       settextvalue("1")
+                       r = exec()
+               }
+               if r=0 return ok
+               nTabSpaces = 0 + oInput.textvalue()
+               SetTabSpaces()
+
+       func SetTabSpaces
+               oTFont.fromstring(cFont)
+               oFontMetrics = new QFontMetrics(oTFont)
+               nSpaceWidth = oFontMetrics.Width(" ",1)
+               textedit1.setTabStopWidth(nTabSpaces*nSpaceWidth)