Thread Rating:
  • 337 Vote(s) - 2.85 Average
  • 1
  • 2
  • 3
  • 4
  • 5
TextAreaのmaxline?
02-27-2013, 01:39 PM,
#1
TextAreaのmaxline?
TextAreaコントロールを使います。
入力行数が最大 三行欲しいです。でも、このコントロールはmaxline のプロパティが無いです。
どの方法でTextAreaの入力行数を制御できますことがを教えてください。
02-28-2013, 01:27 PM, (This post was last modified: 02-28-2013, 01:27 PM by ashimo.)
#2
RE: TextAreaのmaxline?
四行目を入力不可にしてみました。どうでしょうか。
Code:
{let ta = {TextArea
              height = 5cm,
              width = 5cm,
              {on e:ValueChanged at ta:TextArea do
                  let a:int = {ta.value.find '\n'}
                  let count:int = 0
                  let break?:bool = false
                  {while a > -1 do
                      set a = {ta.value.find '\n', starting-index = a + 1}
                      {inc count}
                      {output count}
                      {if count > 2 then
                          set ta.value = ta.user-data
                          set break? = true
                          {break}
                      }
                  }
                  {if not break? then
                      set ta.user-data = ta.value
                  }
              }
          }
}
{value ta}

Forum Jump:


Users browsing this thread:
2 Guest(s)

MyBB SQL Error

MyBB has experienced an internal SQL error and cannot continue.

SQL Error:
1017 - Can't find file: 'mybb_threadviews' (errno: 2)
Query:
INSERT INTO mybb_threadviews (tid) VALUES('855')