4
我用正確的方式使用了ConfigureEvent嗎?當我調整大小或改變窗口的位置時,什麼都沒有發生,標籤的文本不會像我期待的那樣變爲「更改」?F#單聲道GTK ConfigureEvent
module Main =
open System
open Gtk
[<EntryPoint>]
let Main(args) =
Application.Init()
let win = new MainWindow.MyWindow()
// -----------------------------------------
let l = new Label("None")
win.Add l
win.ConfigureEvent.Add(fun _ ->
l.Text <- "Changed")
// -----------------------------------------
win.ShowAll()
Application.Run()
0
它可以與C#一起使用嗎?如果沒有,那麼你使用錯誤的API – knocte