Ruby-tk-messagebox

提供:Dev Guides
移動先:案内検索

Ruby/TK-メッセージボックスウィジェット

標準オプション

NA

ウィジェット固有のオプション

Sr.No. Options & Description
1

icon ⇒ String

messageBoxのアイコンを指定します。 有効な値は errorinfoquestion 、または warning です。

2

type ⇒ String

messageBoxのタイプを指定します。 有効な値は、 abortretryignoreokokcancelretrycancelyesno 、または yesnocancel です。 タイプによって、表示するボタンが決まります。

3

default ⇒ String

デフォルトのボタンを指定します。 これは、前に指定したmessageBoxのタイプに応じて、 abortretryignoreokcancelyes 、または no のいずれかでなければなりません。

4
  • detail *⇒ String

messageBoxの詳細領域のテキストを指定します。

5
  • message *⇒ String

messageBoxのメッセージテキストを指定します。

6
  • title* ⇒ String

messageBoxのタイトルを指定します。

イベントバインディング

NA

require 'tk'

root = TkRoot.new
root.title = "Window"

msgBox = Tk.messageBox (
   'type'    => "ok",
   'icon'    => "info",
   'title'   => "This is title",
   'message' => "This is message"
)
Tk.mainloop

これは、次の結果を生成します-

Ruby/Tk MsgBox