(parent Container, style uint32)
| 20 | } |
| 21 | |
| 22 | func NewTextLabelWithStyle(parent Container, style uint32) (*TextLabel, error) { |
| 23 | tl := new(TextLabel) |
| 24 | |
| 25 | if err := tl.init(tl, parent, style); err != nil { |
| 26 | return nil, err |
| 27 | } |
| 28 | |
| 29 | tl.textAlignment = AlignHNearVNear |
| 30 | |
| 31 | tl.MustRegisterProperty("Text", NewProperty( |
| 32 | func() interface{} { |
| 33 | return tl.Text() |
| 34 | }, |
| 35 | func(v interface{}) error { |
| 36 | return tl.SetText(assertStringOr(v, "")) |
| 37 | }, |
| 38 | tl.textChangedPublisher.Event())) |
| 39 | |
| 40 | return tl, nil |
| 41 | } |
| 42 | |
| 43 | func (tl *TextLabel) asStatic() *static { |
| 44 | return &tl.static |
no test coverage detected
searching dependent graphs…