Skip to content

LineEdit doesn't receive OnTextChanged event when inside a GroupBox #827

Description

@rbeer

When adding a declarative LineEdit to a GroupBox, the LineEdit's OnTextChanged handler isn't called.

  1. Run below sample code
  2. Enter '123' in left LineEdit (both handlers are called)
  3. Enter '123' in the right LineEdit, inside the GoupBox (only OnEditingFinished is called)

walk_ontextchanged

package main

import (
	"fmt"

	. "github.com/lxn/walk/declarative"
)

func main() {
	MainWindow{
		Title:   "no-onTextChanged-in-groupbox",
		Size:    Size{Width: 400, Height: 100},
		MinSize: Size{Width: 400, Height: 100},
		Layout:  Flow{},
		Children: []Widget{
			LineEdit{
				OnTextChanged: func() {
					fmt.Println("nogroup changed")
				},
				OnEditingFinished: func() {
					fmt.Println("nogroup finished")
				},
			},
			GroupBox{
				Layout: HBox{},
				Children: []Widget{
					LineEdit{
						OnTextChanged: func() {
							fmt.Println("group changed")
						},
						OnEditingFinished: func() {
							fmt.Println("group finished")
						},
					},
				},
			},
		},
	}.Run()
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions