Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Clear Combox #204

Closed
Fruchtgummi opened this issue Nov 10, 2016 · 4 comments
Closed

Clear Combox #204

Fruchtgummi opened this issue Nov 10, 2016 · 4 comments

Comments

@Fruchtgummi
Copy link

How i do clear the Combobox?

@andlabs
Copy link
Owner

andlabs commented Nov 10, 2016

What do you mean by clearing it? Removing entries or clearing the editable part?

@Fruchtgummi
Copy link
Author

Yes, removing entries! And what about tables?

@ernierasta
Copy link

ernierasta commented Mar 3, 2018

Hi!
Maybe it is not best solution, but it works for me.

Lets say we have:

box := ui.NewHorizontalBox()
c := ui.NewCombobox()
c.Append("foo")
box.Append(c, false)

Recreate combo with different options:

box.Delete(0) // delete Combobox from parent box
c.Destroy() // destroy Combobox
c := ui.NewCombobox() // recreate empty
c.Append("bar") // add new options
box.Append(c, false) // re-append it to box

Tested only on Linux and Windows. On both system works fine.

@andlabs
Copy link
Owner

andlabs commented Mar 25, 2018

Merged with andlabs/libui#309.

(I will be making a master issue for things in libui missing from package ui later.)

@andlabs andlabs closed this as completed Mar 25, 2018
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants