Class: TkLabelTitledFrame

Inherits:
TkTitledFrame show all
Defined in:
lib/a-tkcommons.rb

Direct Known Subclasses

TkLabelTitledFrameClosable

Instance Attribute Summary

Attributes inherited from TkTitledFrame

#frame, #parent, #top

Attributes inherited from TkBaseTitledFrame

#frame, #top

Instance Method Summary collapse

Methods inherited from TkTitledFrame

#__create_right_label, #create_right_label, #head_buttons, #initialize, #last_caption, #last_caption_image, #maximize, #maximized?, #resize, #restore_caption, #save_caption, #top_text, #top_text_bind_append, #top_text_bind_remove, #top_text_clear, #top_text_hide, #top_text_hint

Methods inherited from TkBaseTitledFrame

#add_fixed_button, #add_fixed_menu_button, #add_fixed_panel, #add_fixed_progress, #add_fixed_sep, #create_frame, #head_buttons, #initialize, #menu_button, #visible?

Constructor Details

This class inherits a constructor from TkTitledFrame

Instance Method Details

#__create_left_label(_frame) ⇒ Object


1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
# File 'lib/a-tkcommons.rb', line 1577

def __create_left_label(_frame)
  @title.nil??_text_title ='':_text_title = @title+' :: '
  _img=@img
  TkLabel.new(_frame, Arcadia.style('titlelabel')){
    text _text_title
    anchor  'w'
    compound 'left'
    image  TkAllPhotoImage.new('file' => _img) if _img
    pack('side'=> 'left','anchor'=> 'e')
  }
end

#create_left_titleObject


1572
1573
1574
1575
# File 'lib/a-tkcommons.rb', line 1572

def create_left_title
  @left_label = __create_left_label(@top)
  @left_label.bind_append("Double-Button-1", proc{resize})
end

#shift_offObject


1594
1595
1596
1597
# File 'lib/a-tkcommons.rb', line 1594

def shift_off
  @left_label.state='disable'
  #@left_label.foreground(Arcadia.conf('titlelabel.disabledforeground'))
end

#shift_onObject


1589
1590
1591
1592
# File 'lib/a-tkcommons.rb', line 1589

def shift_on
  @left_label.state='normal'
  #@left_label.foreground(Arcadia.conf('titlelabel.foreground'))
end

#title(_text = nil) ⇒ Object


1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
# File 'lib/a-tkcommons.rb', line 1599

def title(_text=nil)
  if _text.nil?
    return @title
  else
    @title=_text
    if _text.strip.length == 0
      @left_label.text('')
    else
      @left_label.text(_text+'::')
    end
  end
end