Added scrollable element interface
This commit is contained in:
@@ -182,15 +182,6 @@ func (element *TextBox) SetPlaceholder (placeholder string) {
|
||||
}
|
||||
}
|
||||
|
||||
func (element *TextBox) updateMinimumSize () {
|
||||
textBounds := element.placeholderDrawer.LayoutBounds()
|
||||
element.core.SetMinimumSize (
|
||||
textBounds.Dx() +
|
||||
theme.Padding() * 2,
|
||||
element.placeholderDrawer.LineHeight().Round() +
|
||||
theme.Padding() * 2)
|
||||
}
|
||||
|
||||
func (element *TextBox) SetValue (text string) {
|
||||
// if element.text == text { return }
|
||||
|
||||
@@ -230,6 +221,15 @@ func (element *TextBox) OnChange (callback func ()) {
|
||||
element.onChange = callback
|
||||
}
|
||||
|
||||
func (element *TextBox) updateMinimumSize () {
|
||||
textBounds := element.placeholderDrawer.LayoutBounds()
|
||||
element.core.SetMinimumSize (
|
||||
textBounds.Dx() +
|
||||
theme.Padding() * 2,
|
||||
element.placeholderDrawer.LineHeight().Round() +
|
||||
theme.Padding() * 2)
|
||||
}
|
||||
|
||||
func (element *TextBox) runOnChange () {
|
||||
if element.onChange != nil {
|
||||
element.onChange()
|
||||
|
||||
Reference in New Issue
Block a user