GUI more stable than before
Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
parent
baecdd3d58
commit
6f149c2706
24
infoTabUI.go
24
infoTabUI.go
|
@ -1,21 +1,22 @@
|
|||
package main
|
||||
|
||||
import "log"
|
||||
// import "time"
|
||||
// import "fmt"
|
||||
import "time"
|
||||
import "fmt"
|
||||
|
||||
import "github.com/gookit/config"
|
||||
|
||||
import "github.com/andlabs/ui"
|
||||
import _ "github.com/andlabs/ui/winmanifest"
|
||||
|
||||
import "git.wit.com/wit/gui"
|
||||
|
||||
// import "github.com/davecgh/go-spew/spew"
|
||||
|
||||
var jwcmainwin *ui.Window
|
||||
var jwcmaintab *ui.Tab
|
||||
var tabcount int
|
||||
|
||||
|
||||
func makeCloudInfoBox() ui.Control {
|
||||
hbox := ui.NewHorizontalBox()
|
||||
hbox.SetPadded(true)
|
||||
|
@ -158,3 +159,20 @@ func setupCloudUI() {
|
|||
|
||||
jwcmainwin.Show()
|
||||
}
|
||||
|
||||
func add2() {
|
||||
var parts []gui.InputData
|
||||
|
||||
for key, foo := range []string{"BG", "TEXTCOLOR", "BUTTON", "TEXTCOLOR", "TEXTCOLOR", "TEXT", "BUTTON", "TEXT", "BUTTON"} {
|
||||
log.Println(key, foo)
|
||||
|
||||
var b gui.InputData
|
||||
b.CellType = foo
|
||||
b.Heading = fmt.Sprintf("heading%d", key)
|
||||
parts = append(parts, b)
|
||||
}
|
||||
|
||||
log.Println("Sleep for 2 seconds, then try to add new tabs")
|
||||
time.Sleep(1 * 1000 * 1000 * 1000)
|
||||
gui.AddTableTab(jwcmaintab, 1, "test seven", 7, parts)
|
||||
}
|
||||
|
|
21
main.go
21
main.go
|
@ -3,14 +3,14 @@ package main
|
|||
import "log"
|
||||
import "os"
|
||||
import "time"
|
||||
import "fmt"
|
||||
// import "fmt"
|
||||
|
||||
import "github.com/gookit/config"
|
||||
|
||||
import "github.com/andlabs/ui"
|
||||
import _ "github.com/andlabs/ui/winmanifest"
|
||||
|
||||
import "git.wit.com/wit/gui"
|
||||
// import "git.wit.com/wit/gui"
|
||||
|
||||
// import "github.com/davecgh/go-spew/spew"
|
||||
|
||||
|
@ -27,23 +27,6 @@ import "git.wit.com/wit/gui"
|
|||
// always sorted slice (new project)
|
||||
// https://github.com/yaa110/sslice
|
||||
|
||||
func add2() {
|
||||
var parts []gui.InputData
|
||||
|
||||
for key, foo := range []string{"BG", "TEXTCOLOR", "BUTTON", "TEXTCOLOR", "TEXTCOLOR", "TEXT", "BUTTON", "TEXT", "BUTTON"} {
|
||||
log.Println(key, foo)
|
||||
|
||||
var b gui.InputData
|
||||
b.CellType = foo
|
||||
b.Heading = fmt.Sprintf("heading%d", key)
|
||||
parts = append(parts, b)
|
||||
}
|
||||
|
||||
log.Println("Sleep for 2 seconds, then try to add new tabs")
|
||||
time.Sleep(1 * 1000 * 1000 * 1000)
|
||||
gui.AddTableTab("test seven", 7, parts)
|
||||
}
|
||||
|
||||
func main() {
|
||||
parseConfig()
|
||||
|
||||
|
|
Loading…
Reference in New Issue