Thread Rating:
  • 320 Vote(s) - 2.76 Average
  • 1
  • 2
  • 3
  • 4
  • 5
RecordGridColumnGroupの背景色
10-06-2015, 10:01 AM,
#3
RE: RecordGridColumnGroupの背景色
実行できるようなサンプルがついてないので推測ですが、
以下のようにしてRecordGridColumnGroupの方にも背景色を
設定したいということでしょうか。

それならば、RecordGridのheader-optionsオプションに設定すればどうでしょうか。

header-options = {RecordGridRowOptions background = "#94cbff"},

Code:
{define-proc public {make-header rgc:RecordGridColumn}:Graphic
    def f =
        {VBox
            height = 15px,
            width = {make-elastic},
            halign = "center",
            {RasterBox
                font-size = 9pt,
                {splice rgc.field.caption}
            },
            {Fill}
        }
    {after 0s do
        def h = f.parent
        set h.background = "#94cbff"
        
    }
    {return f }
}

{value
    let people:RecordSet =
        {RecordSet
            {RecordFields
                {RecordField
                    "First1", caption = "First Name1", domain = String
                },
                {RecordField
                    "First2", caption = "First Name2", domain = String
                },
                {RecordField
                    "Last", caption = "Last Name", domain = String
                },
                {RecordField "Age1", domain = int},
                {RecordField "Age2", domain = int}
            },
            {RecordData First1 = "John", First2 = "John2", Last = "Smith", Age1 = 25, Age2 = 252},
            {RecordData First1 = "Jane", First2 = "Jane2", Last = "Smith", Age1 = 29, Age2 = 252},
            {RecordData First1 = "Jane", First2 = "Jane2", Last = "Jones", Age1 = 28, Age2 = 252}
        }
    
    let r:RecordGrid =
        {RecordGrid
            header-options = {RecordGridRowOptions background = "#94cbff"},
            record-source = people,
            height = 10cm,
            width = 13cm,
            header-spec = make-header,
            {RecordGridColumnGroup
                "",
                {RecordGridColumn "First1"}
            },
            {RecordGridColumnGroup
                "Name",
                {RecordGridColumn "First2"},
                {RecordGridColumn "Last"},
                {RecordGridColumn "Age1"}
            },
            {RecordGridColumnGroup
                "Ageeee",
                {RecordGridColumn "Age2"}
            }
        }
    
    r
}


Messages In This Thread
RecordGridColumnGroupの背景色 - by da-itoh - 10-06-2015, 09:02 AM
RE: RecordGridColumnGroupの背景色 - by dankom - 10-06-2015, 10:01 AM
RE: RecordGridColumnGroupの背景色 - by dankom - 10-06-2015, 02:44 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('1262')