Sha256: 0a0762d91c99b69fd7d031816af63e468a2f394b892c78570999d642663cc7cf
Contents?: true
Size: 862 Bytes
Versions: 92
Compression:
Stored size: 862 Bytes
Contents
# frozen_string_literal: true require 'glimmer-dsl-libui' class BasicEntry include Glimmer attr_accessor :entry_text def launch window('Basic Entry', 300, 50) { horizontal_box { entry { # stretchy true # Smart default option for appending to horizontal_box text <=> [self, :entry_text, after_write: ->(text) {puts text; $stdout.flush}] # bidirectional data-binding between text property and entry_text attribute, printing after write to model. } button('Button') { stretchy false # stretchy property is available when control is nested under horizontal_box on_clicked do msg_box('You entered', entry_text) end } } on_closing do puts 'Bye Bye' end }.show end end BasicEntry.new.launch
Version data entries
92 entries across 92 versions & 1 rubygems