Gambas/Dialogue
外觀
< Gambas
返回 Gambas
它們讓你的編碼更容易。
在下面的例子中,你將使用標準對話方塊來選擇
- 字型
- 顏色
- 檔名
- 檔案路徑
你需要一個文字區域和三個命令按鈕,才能讓程式執行起來。
PUBLIC SUB Button1_Click() IF Dialog.SelectFont() THEN RETURN Textarea1.Font = Dialog.Font END PUBLIC SUB Button2_Click() IF Dialog.SelectColor() THEN RETURN Textarea1.Background = Dialog.Color END PUBLIC SUB Button3_Click() Dialog.SaveFile() File.Save(Dialog.Path, TextArea1.Text) CATCH IF ERROR THEN RETURN END
Color Filter Font Path Title
OpenFile SaveFile SelectColor SelectDirectory SelectFont