Skip to content

Commit

Permalink
Fix form layout - don't add duplicate first rows
Browse files Browse the repository at this point in the history
  • Loading branch information
andydotxyz committed Feb 20, 2019
1 parent d796418 commit 4028fd9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions widget/form.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,10 @@ func (f *Form) Append(text string, widget fyne.CanvasObject) {

// AppendItem adds the specified row to the end of the Form
func (f *Form) AppendItem(item *FormItem) {
f.Items = append(f.Items, item)
// ensure we have a renderer set up
Renderer(f)

f.ensureGrid()
f.Items = append(f.Items, item)
f.itemGrid.AddObject(f.createLabel(item.Text))
f.itemGrid.AddObject(item.Widget)

Expand Down

0 comments on commit 4028fd9

Please sign in to comment.