Gambas2 コーディングメモ

索引サイト

Format // テーブル項目の Alignment




TableView2[$idx, w_year_column].Text = Format($result!amount, "###,###,###")
TableView2[$idx, w_year_column].Alignment = Align.Right

Try使用方法 // テーブルの Row Column




WHILE $result2.Available
TRY TableView1[$idx, 5].Text = Format($result2!amount, "###,###,###")
TRY TableView1[$idx, 6].Text = Format($result2!number, "###,###")
$result2.MoveNext
WEND

配列 // 日付フォーマット // Doevents --> Wait




FOR w_idx = 1 TO 31
$query = "insert into tb_datadd"
$query &= " (course,year,month,day,amount,number,tantou,sydate) values"
$query &= "('" & Label_course.Text & "'"
$query &= "," & $year
$query &= "," & $month
$query &= "," & w_idx
$query &= "," & $amount[w_idx]
$query &= "," & $number[w_idx]
$query &= ",'" & Label_tantou.Text & "'"
$query &= ",'" & Format(Now(), "yyyy-mm-dd hh-nn-ss") & "')"
'//Message($query)
$result = $db.$connection.Exec($query)
Button_Update.Caption = Format(w_idx, "###")
WAIT
NEXT

テーブル基本操作




DIM w_idx AS Integer
FOR w_idx = 0 TO TableViewCourse.Rows.Count - 1
TableViewCourse[w_idx, 0].Background = Color.White
TableViewCourse[w_idx, 1].Background = Color.White
NEXT
Label_course.Text = TableViewCourse[LAST.Row, 0].Text
Label_tantou.Text = TableViewCourse[LAST.Row, 1].Text
TableViewCourse[LAST.Row, 0].Background = Color.Cyan
TableViewCourse[LAST.Row, 1].Background = Color.Cyan
TableViewCourse.Refresh




AX