ui.Checkbox.style

Widget'ın stilini döndürür. Bu stil, widget'ın stillerini güncellemek için değiştirilebilir.

CSS'deki benzerlerine benzer şekilde davranan özellikler:

  - height, maxHeight, minHeight (ör. "100px")

  - width, maxWidth, minWidth (ör. "100px")

  - padding, margin (ör. "4px 4px 4px 4px" veya yalnızca "4px")

  - color, backgroundColor (ör. "red" veya "#FF0000")

  - border (ör. "1px solid black")

  - borderColor (ör. "kırmızı siyah mavi #FF0000")

  - borderRadius (ör. "10px")

  - borderStyle (ör. "solid dashed none dotted")

  - borderWidth (ör. "1px 0px 1px 0px")

  - fontSize (ör. "24px")

  - fontStyle (ör. "italik")

  - fontWeight (ör. "bold" veya "100")

  - fontFamily (ör. "monospace" veya "serif")

  - textAlign (ör. "left" veya "center")

  - textDecoration (ör. "underline" veya "line-through")

  - whiteSpace (ör. "nowrap" veya "pre")

  - gösterilir (doğru veya yanlış)

Desteklenen özel düzen özellikleri (ui.Panel.Layout dokümanına bakın):

  - stretch ("horizontal", "vertical", "both")

  - konum ("sağ üst", "üst orta", "sol üst", "sağ alt", ...)

Kullanımİadeler
Checkbox.style()ui.data.ActiveDictionary
Bağımsız DeğişkenTürAyrıntılar
bu: ui.widgetui.Widgetui.Widget örneği.

Örnekler

Kod Düzenleyici (JavaScript)

// Define a UI widget and add it to the map.
var widget = ui.Checkbox({label: 'A ui.Checkbox', style: {width: '400px'}});
Map.add(widget);

// View the UI widget's style properties; an ActiveDictionary.
print(widget.style());

// ActiveDictionaries are mutable; set a style property.
widget.style().set('color', 'blue');
print(widget.style());

// Define the UI widget's style ActiveDictionary as a variable.
var widgetStyle = widget.style();
print(widgetStyle);

// Set the UI widget's style properties from the ActiveDictionary variable.
widgetStyle.set({border: '5px solid darkgray'});
print(widgetStyle);