diff options
| author | Jeff Carr <[email protected]> | 2019-05-31 23:45:53 -0700 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2019-05-31 23:45:53 -0700 |
| commit | 133ed30192bce5e2b10a993aaa17d26a11bed93f (patch) | |
| tree | 65dbf635111835f320b6d92b92df7d4767e8c96d /gui.go | |
| parent | 7fb156963dba9e6a6accc07c07ede3a873a7fd4b (diff) | |
rearrange some code
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'gui.go')
| -rw-r--r-- | gui.go | 33 |
1 files changed, 33 insertions, 0 deletions
@@ -10,6 +10,8 @@ import pb "git.wit.com/wit/witProtobuf" import "github.com/davecgh/go-spew/spew" +// THIS IS CLEAN (all that is left is the 'createAddVmBox') + func InitColumns(mh *TableData, parts []TableColumnData) { tmpBTindex := 0 humanID := 0 @@ -284,3 +286,34 @@ func SetText(box *GuiBox, name string, value string) error { log.Println("gui.SetText() END") return nil } + +// makeEntryBox(box, "hostname:", "blah.foo.org") { +func MakeEntryVbox(box *GuiBox, a string, startValue string, edit bool, action string) *GuiEntry { + // Start 'Nickname' vertical box + vboxN := ui.NewVerticalBox() + vboxN.SetPadded(true) + vboxN.Append(ui.NewLabel(a), false) + + e := defaultMakeEntry(startValue, edit, action) + + vboxN.Append(e.UiEntry, false) + box.UiBox.Append(vboxN, false) + // End 'Nickname' vertical box + + return e +} + +func MakeEntryHbox(box *GuiBox, a string, startValue string, edit bool, action string) *GuiEntry { + // Start 'Nickname' vertical box + hboxN := ui.NewHorizontalBox() + hboxN.SetPadded(true) + hboxN.Append(ui.NewLabel(a), false) + + e := defaultMakeEntry(startValue, edit, action) + hboxN.Append(e.UiEntry, false) + + box.UiBox.Append(hboxN, false) + // End 'Nickname' vertical box + + return e +} |
