public static cave.ui.SelectWidget forStringList(cave.GuiApplicationContext context, cape.DynamicVector options) { var v = new cave.ui.SelectWidget(context); v.setWidgetItemsAsStringList(options); return(v); }
public static cave.ui.SelectWidget forStringList(cave.GuiApplicationContext context, System.Collections.Generic.List <string> options) { var v = new cave.ui.SelectWidget(context); v.setWidgetItemsAsStringList(options); return(v); }
public static cave.ui.SelectWidget forKeyValueStrings(cave.GuiApplicationContext context, object[] options) { var v = new cave.ui.SelectWidget(context); v.setWidgetItemsAsKeyValueStrings(options); return(v); }
public static cave.ui.SelectWidget forKeyValueList(cave.GuiApplicationContext context, cape.KeyValueList <string, string> options) { var v = new cave.ui.SelectWidget(context); v.setWidgetItemsAsKeyValueList(options); return(v); }
public virtual Windows.UI.Xaml.UIElement setStyleForSelectWidget(cave.ui.SelectWidget widget, bool allowReplace) { widget.setWidgetBackgroundColor(cave.Color.white()); widget.setWidgetPadding(context.getHeightValue("1500um")); widget.setWidgetFontSize((double)context.getHeightValue("3000um")); return((Windows.UI.Xaml.UIElement)widget); }
public override void initializeWidget() { base.initializeWidget(); dayBox = cave.ui.SelectWidget.forStringList(context, new object[] { "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31" }); monthBox = cave.ui.SelectWidget.forKeyValueStrings(context, new object[] { "1:January", "2:February", "3:March", "4:April", "5:May", "6:June", "7:July", "8:August", "9:September", "10:October", "11:November", "12:December" }); var cy = cape.DateTime.forNow().getYear(); if (cy < 1) { cy = 2016; } cy -= skipYears; var yearOptions = new cape.KeyValueList <string, string>(); for (var i = cy; i >= 1920; i--) { var str = cape.String.forInteger(i); yearOptions.add((string)str, (string)str); } yearBox = cave.ui.SelectWidget.forKeyValueList(context, yearOptions); var box = cave.ui.HorizontalBoxWidget.forContext(context); box.setWidgetSpacing(context.getHeightValue("1mm")); box.addWidget((Windows.UI.Xaml.UIElement)dayBox, (double)1); box.addWidget((Windows.UI.Xaml.UIElement)monthBox, (double)2); box.addWidget((Windows.UI.Xaml.UIElement)yearBox, (double)1); addWidget((Windows.UI.Xaml.UIElement)box); applyValueToWidgets(); }