Thread Rating:
  • 460 Vote(s) - 2.71 Average
  • 1
  • 2
  • 3
  • 4
  • 5
RecordGridのカラム名変更について
08-27-2011, 04:50 PM, (This post was last modified: 08-30-2011, 06:16 PM by onyo.)
#2
Lightbulb  RE: RecordGridのカラム名変更について
過去ログを追いましたら、
header-spec を使えばなんとかなりそうな気がしてきました。
なかなか情報が少ないだけに Curl Global Community はとても助かりますね。

追記です。 再描画は対応できますが、途中でってのは無理なのでしょうか。
Code:
{let public japanese?:bool = true}
{define-enum public HeaderJ
    First = "名前",
    Last = "苗字",
    Age = "年齢"
}
{define-proc public {make-header rgc:RecordGridColumn}:Graphic
    let s:String = rgc.field.name
    {if japanese? then
        {for h in HeaderJ do
            {if h.name == rgc.field.name then
                set s = h.value
                {break}
            }
        }
    }
    {return
        {TextFlowBox
            s
        }
    }
  }
{let people:RecordSet =
    {RecordSet
        {RecordFields
            {RecordField
                "First", caption = "First Name", domain = String
            },
            {RecordField
                "Last", caption = "Last Name", domain = String
            },
            {RecordField "Age", domain = int}
        },
        {RecordData First = "John", Last = "Smith", Age = 25},
        {RecordData First = "Jane", Last = "Smith", Age = 29},
        {RecordData First = "Jane", Last = "Jones", Age = 28}
    }
}
{let rg:RecordGrid =
    {RecordGrid
        header-spec = make-header,
        record-source = people,
        height = 3cm
    }
}
{set japanese? = false}
{let rg2:RecordGrid =
    {RecordGrid
        header-spec = make-header,
        record-source = people,
        height = 3cm
    }
}
{value {VBox rg,rg2}}


Messages In This Thread
RE: RecordGridのカラム名変更について - by onyo - 08-27-2011, 04:50 PM
Forum Jump:


Users browsing this thread:
1 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('244')