aとbに数値を入力すると、他の欄が計算されます。

画面

Braid言語の記述
{view:LineLayout{unit = 2, children:{
  aLabel:Label{value = "a"}, a:NumberBox{value:Integer32, initialValue = 0, format = "0"},
  bLabel:Label{value = "b"}, b:NumberBox{value:Integer32, initialValue = 0, format = "0"},
  cLabel:Label{value = "c = a"}, c:NumberBox{value = a.value, initialValue = 0, format = "0"},
  dLabel:Label{value = "a + b"}, d:NumberBox{value = a.value + b.value, format = "0"},
  eLabel:Label{value = "a - b"}, e:NumberBox{value = a.value - b.value, format = "0"},
}}}

個人データをタブで切り替えて編集できます。

画面

Braid言語の記述
{view:DeckLayout{children:[{
  label = content.child.children.name.value,
  content:ScrollLayout{child:LineLayout{
    unit = 2,
    children:{
      name_label    :Label{value = "名前"    }, name    : TextBox        {value:Text, initialValue = "新規"},
      birthday_label:Label{value = "生年月日"}, birthday: CalendarBox    {value:Text, format = "yyyy年MM月dd日", initialValue = "2009-01-02T03:04:05+09:00"},
      blood_label   :Label{value = "血液型"  }, blood   : DropDownListBox{value:Text, initialValue = "A", candidates = ["A", "B", "O", "AB"]},
      age_label     :Label{value = "年齢"    }, age     : NumberBox      {value:Integer32, format = "0才", initialValue = 50},
      sex_label     :Label{value = "性別"    }, sex     : RadioGroup     {value:Text, candidates = ["男", "女"], value:Text, initialValue = "男"},
      table_label   :Label{value = "身体測定"}, table   : TableLayout    {
        cells:[{
          date   : CalendarCell{value:Text, initialValue = "2009-01-02T03:04:05+09:00", format = "yyyy-MM-dd"},
          time   : DateTimeCell{value:Text, initialValue = "2009-01-02T03:04:05+09:00", format = "HH:mm:ss"},
          height : NumberCell  {value:Real32, format = "000.0cm", initialValue = 150},
          weight : NumberCell  {value:Real32, format = "000.0kg", initialValue = 50},
          remarks: TextCell    {value:Text, initialValue = ""},
        }],
        columns:{
          date   : {label = "日付"},
          time   : {label = "時刻"},
          height : {label = "身長"},
          weight : {label = "体重"},
          remarks: {label = "備考"},
        }
      }
    }
  }
}}]}}

売上高を集計します。

画面

Braid言語の記述
{
  view : LineLayout{
    unit = 7,
    Number == NumberBox{initialValue = 0, format = "###,###,##0円"},
    Change == NumberBox{value:Integer32, initialValue = 0, format = (value > 0 ? "+" : "") + "###,###,##0円"},
    Ratio == NumberBox{initialValue = 0, format = "#0.##%"},
    children :
    {
      nameLabel:Label{value = "科目名"},
      lastYearDataLabel:Label{value = "前年実績"},lastYearRatioLabel:Label{value = "構成比"},
      thisYearDataLabel:Label{value = "当年実績"},thisYearRatioLabel:Label{value = "構成比"},
      changeDataLabel:Label{value = "増減額"},changeRatioLabel:Label{value = "増減比"},
 
      name1Label:Label{value = "商品売上高"},
      lastYearData1:Number{value:Integer32},lastYearRatio1:Ratio{value=lastYearDataSum.value==0?0:lastYearData1.value*100/lastYearDataSum.value},
      thisYearData1:Number{value:Integer32},thisYearRatio1:Ratio{value=thisYearDataSum.value==0?0:thisYearData1.value*100/thisYearDataSum.value},
      changeData1:Change{value=thisYearData1.value-lastYearData1.value},changeRatio1:Ratio{value=lastYearData1.value==0?0:thisYearData1.value*100/lastYearData1.value},
 
      name2Label:Label{value = "サービス売上高"},
      lastYearData2:Number{value:Integer32},lastYearRatio2:Ratio{value=lastYearDataSum.value==0?0:lastYearData2.value*100/lastYearDataSum.value},
      thisYearData2:Number{value:Integer32},thisYearRatio2:Ratio{value=thisYearDataSum.value==0?0:thisYearData2.value*100/thisYearDataSum.value},
      changeData2:Change{value=thisYearData2.value-lastYearData2.value},changeRatio2:Ratio{value=lastYearData2.value==0?0:thisYearData2.value*100/lastYearData2.value},
 
      name3Label:Label{value = "製品売上高"},
      lastYearData3:Number{value:Integer32},lastYearRatio3:Ratio{value=lastYearDataSum.value==0?0:lastYearData3.value*100/lastYearDataSum.value},
      thisYearData3:Number{value:Integer32},thisYearRatio3:Ratio{value=thisYearDataSum.value==0?0:thisYearData3.value*100/thisYearDataSum.value},
      changeData3:Change{value=thisYearData3.value-lastYearData3.value},changeRatio3:Ratio{value=lastYearData3.value==0?0:thisYearData3.value*100/lastYearData3.value},
 
      nameSumLabel:Label{value = "売上高合計"},
      lastYearDataSum:Number{value = lastYearData1.value+lastYearData2.value+lastYearData3.value},lastYearRatioSum:Ratio{value=lastYearRatio1.value+lastYearRatio2.value+lastYearRatio3.value},
      thisYearDataSum:Number{value = thisYearData1.value+thisYearData2.value+thisYearData3.value},thisYearRatioSum:Ratio{value=thisYearRatio1.value+thisYearRatio2.value+thisYearRatio3.value},
      changeDataSum:Change{value = changeData1.value+changeData2.value+changeData3.value},changeRatioSum:Ratio{value=lastYearDataSum.value==0?0:thisYearDataSum.value*100/lastYearDataSum.value},
    }
  },
}

ホーム | RSS | 採用情報 | 会社情報