Module: VER::Status::LabelToggle

Included in:
Label, NanoHelp
Defined in:
lib/ver/status.rb

Instance Method Summary collapse

Instance Method Details

#toggleObject



62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# File 'lib/ver/status.rb', line 62

def toggle
  info = grid_info

  if info.empty?
    grid_configure(@last_grid_info)
    status.show
    true
  else
    @last_grid_info = info
    grid_forget
    unless status.winfo_children.any?{|child| Tk::Winfo.ismapped(child) }
      status.hide
    end
    false
  end
end