• 子协程中操作界面UI

  • 需要这样否则界面会卡死:

    lcl.ThreadSync(func() {
       Sbox = lcl.NewScrollBox(bw)
       Sbox.SetParent(bw)
       Sbox.SetBorderStyle(types.BsNone)
       Sbox.SetColor(colors.ClGreen)
    
       Sbox.SetTop(500)
       Sbox.SetHeight(200)
       //Sbox.SetWidth(bw.Width())
       Sbox.SetAlign(types.AlBottom)
       //Sbox.SetAnchors(types.NewSet(types.AkLeft, types.AkRight, types.AkBottom)) // 使panel自动根据窗口调整大小
    
       fmt.Println("创建一个panel")
    })