Thread Rating:
  • 311 Vote(s) - 2.75 Average
  • 1
  • 2
  • 3
  • 4
  • 5
RecordGridでレコード(行) を選択しても選択時の色にならない
06-12-2013, 05:11 PM,
#3
RE: RecordGridでレコード(行) を選択しても選択時の色にならない
ありがとうございます。

アドバイスのとおり実行したらイメージどおりの表示になりました。

Code:
{curl 8.0 applet}
{import * from CURL.GUI.CHARTS}
{import * from CURL.GUI.STANDARD}

{define-class public ClassA {inherits StandardStringCell}
  
  {constructor public {default}
    {construct-super}
  }
  
  {method public {refresh-data}:void
    
    {super.refresh-data}
    {if self.selected? then
        {return}
    }

    {if-non-null record:Record = self.record  then
        {if record.pending-update?
         then
            set self.background = "yellow"
         else             
            {unset self.selected-background}
            {unset self.selected-color}
        }
    }
  }
}

{let RS:RecordSet =
    {RecordSet
        {RecordFields
            {RecordField "BASE", domain = String},
            {RecordField "Month_4", domain = int},
            {RecordField "Month_5", domain = int},
            {RecordField "Month_6", domain = int}
        },
        {RecordData BASE = "A", Month_4 = 120, Month_5 = 150, Month_6 = 200},
        {RecordData BASE = "B", Month_4 = 100, Month_5 = 130, Month_6 = 115},
        {RecordData BASE = "C", Month_4 = 90, Month_5 = 70, Month_6 = 80},
        {RecordData BASE = "D", Month_4 = 130, Month_5 = 170, Month_6 = 150},
        {RecordData BASE = "E", Month_4 = 500, Month_5 = 450, Month_6 = 500}        
    }
}       

{def rg = {RecordGrid
              record-source = RS,
              height = 200,
              width = 500,
              {RecordGridColumn "BASE",cell-spec= ClassA},
              {RecordGridColumn "Month_4",cell-spec= ClassA},
              {RecordGridColumn "Month_5",cell-spec= ClassA},
              {RecordGridColumn "Month_6",cell-spec= ClassA}
          }
}

{value rg}


Messages In This Thread
RE: RecordGridでレコード(行) を選択しても選択時の色にならない - by NISHIKIDA - 06-12-2013, 05:11 PM
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('909')