Label

English

Labelは編集できないテキストを表示します。

表示例

Label on Ubuntu
Ubuntu
Label on Windows
Windows
Label on macOS
macOS

実行例

require "uing"

UIng.init

window = UIng::Window.new("Label Example", 300, 100, margined: true)
window.on_closing do
  UIng.quit
  true
end

label = UIng::Label.new("This is a label.")
label.font_size = 24

window.child = label
window.show

UIng.main
UIng.uninit

使い方

  • 表示内容はtext=で更新します。
  • font_sizeでサイズを変更し、reset_font_sizeで標準サイズへ戻せます。

APIリファレンス · Galleryソース