Sha256: 33ae6a6fe4269df8d786bfdf37889cef252ba803988f5a70ebb12079cbbf71f0

Contents?: true

Size: 748 Bytes

Versions: 9

Compression:

Stored size: 748 Bytes

Contents

#!/usr/bin/env ruby

require_relative '../lib/ffi-tk'

Tk.init

text = Tk::Text.new('.')
text.insert :end, 'Hello, World!'
text.pack
p text.bbox '0.1'
p text.index 'end'

%w[ autoseparators autoseparators blockcursor endline inactiveselectbackground
maxundo spacing1 spacing2 spacing3 startline state tabs tabstyle undo width wrap

background bg
borderwidth bd
cursor
exportselection
font
foreground
fg
highlightbackground
highlightcolor
highlightthickness
insertbackground
insertborderwidth
insertofftime
insertontime
insertwidth
padx
pady
relief
selectbackground
selectborderwidth
selectforeground
setgrid
takefocus
xscrollcommand
yscrollcommand
].each do |option|
  p option: text.cget(option)
end

Tk.root.bind('Control-q'){ exit }

Tk.mainloop

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
ffi-tk-2010.08.23 example/text.rb
ffi-tk-2010.08 example/text.rb
ffi-tk-2010.06 example/text.rb
ffi-tk-2010.03 example/text.rb
ffi-tk-2010.02 example/text.rb
ffi-tk-2010.01 example/text.rb
ffi-tk-2010.01.02 example/text.rb
ffi-tk-2009.12.14 example/text.rb
ffi-tk-2009.11.29 example/text.rb