MCPcopy Create free account
hub / github.com/cogentcore/core / AddText

Method AddText

core/body.go:94–100  ·  view source on GitHub ↗

AddText adds the given supporting [Text], typically added after a title.

(text string)

Source from the content-addressed store, hash-verified

92// AddText adds the given supporting [Text], typically added
93// after a title.
94func (bd *Body) AddText(text string) *Body {
95 NewText(bd).SetText(text).
96 SetType(TextBodyMedium).Styler(func(s *styles.Style) {
97 s.Color = colors.Scheme.OnSurfaceVariant
98 })
99 return bd
100}
101
102// SetData sets the [Body]'s [Scene.Data].
103func (bd *Body) SetData(data any) *Body {

Callers 15

MessageDialogFunction · 0.95
deleteFilesMethod · 0.80
pasteCopyFilesCheckMethod · 0.80
pasteFilesMethod · 0.80
openValueDialogFunction · 0.80
confirmDialogMethod · 0.80
CallFuncMethod · 0.80
showReturnsDialogMethod · 0.80
insertAtMethod · 0.80
AddChildNodeMethod · 0.80
editRecentPathsMethod · 0.80
InitMethod · 0.80

Calls 4

StylerMethod · 0.80
NewTextFunction · 0.70
SetTypeMethod · 0.45
SetTextMethod · 0.45

Tested by 1