Skip to content

Bind() doesn't work? #2

Description

@jcsmnt0

I can't get the Bind() method to work at all. All of your examples build and run for me, but button clicks or anything else that uses Bind() doesn't work. Even trivially simple code like this doesn't work:

func onclick(arg *gform.EventArg) {
    println("hello")
}

func main() {
    gform.Init()

    mainWindow := gform.NewForm(nil)

    btn := gform.NewPushButton(mainWindow)
    btn.OnLBDown().Bind(onclick)

    mainWindow.Show()

    gform.RunMainLoop()
}

The code builds and runs and the window appears with the button, but nothing happens when I click the button. Am I doing something wrong? I'm running on Windows 7 64-bit, using go1.

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