### In Files

- wx/classes/treectrl.rb

### Parent

Wx::Object

### Methods

- get_children
- get_item_rect
- get_label_rect

### Included Modules

- Enumerable

### Files

- wxruby2.lib

### Class Index

Quicksearch

- Wx
- Wx::AcceleratorTable
- Wx::Animation
- Wx::App
- Wx::ArtProvider
- Wx::AuiNotebook
- Wx::Bitmap
- Wx::BusyCursor
- Wx::CheckListBox
- Wx::Choice
- Wx::ClientDC
- Wx::Clipboard
- Wx::Colour
- Wx::ComboBox
- Wx::CommandEvent
- Wx::ControlWithItems
- Wx::DC
- Wx::Event
- Wx::EvtHandler
- Wx::Font
- Wx::Grid
- Wx::HelpController
- Wx::HelpControllerHelpProvider
- Wx::HelpProvider
- Wx::HtmlHelpController
- Wx::HtmlWindow
- Wx::Icon
- Wx::IconBundle
- Wx::Image
- Wx::ImageList
- Wx::KeywordConstructor
- Wx::KeywordConstructor::ClassMethods
- Wx::ListBox
- Wx::ListCtrl
- Wx::Locale
- Wx::MediaCtrl
- Wx::Menu
- Wx::MenuItem
- Wx::Notebook
- Wx::Object
- Wx::PaintDC
- Wx::Point
- Wx::PreviewFrame
- Wx::Rect
- Wx::RichTextCtrl
- Wx::SimpleHelpProvider
- Wx::Size
- Wx::Sizer
- Wx::Sound
- Wx::StandardPaths
- Wx::TextCtrl
- Wx::TextUrlEvent
- Wx::Timer
- Wx::ToolBar
- Wx::ToolBarTool
- Wx::TreeCtrl
- Wx::Window
- Wx::XmlResource
- Rumix
- Rumix::Application
- Rumix::Config
- Rumix::Registry
- Rumix::Widget
- Rumix::Widget::CheckOptionPanel
- Rumix::Widget::OptionItem
- Rumix::Widget::OptionPanel
- Rumix::Widget::RadioOptionPanel
- Rumix::Widget::TitleText
- ROpt
- ROpt::ArgumentParser
- ROpt::ParseResult
- Uconv
- Uconv::Error
- Enumerable
- File
- Ini
- Kernel
- Module
- Object
- Pathname
- WxConstructor
- WxRubyStyleAccessors

No matching classes.

# Wx::TreeCtrl

Hierarchical control with items

### Public Instance Methods

get_children(parent) click to toggle source

Return the children of `parent` as an array of TreeItemIDs.

    # File wx/classes/treectrl.rb, line 9
      def get_children(parent)
        kids = [ get_first_child(parent) ]
        return [] if kids[0].zero?

        while kid = get_next_sibling(kids.last) and not kid.zero?
          kids << kid
        end
        kids
      end

get_item_rect(tree_item_id) click to toggle source

Returns a Wx::Rect corresponding to the edges of an individual tree item, including the button, identified by id. The standard wxWidgets API for getting the pixel location of an item is unrubyish, using an input/output parameter. But since the underlying get_bounding_rect method works, it’s easier to fix the API in Ruby than adding more to the already-toxic swig interface TreeCtrl.i file.

    # File wx/classes/treectrl.rb, line 25
      def get_item_rect(tree_item_id)
        rect = Wx::Rect.new
        if get_bounding_rect(tree_item_id, rect, false)
          return rect
        else
          return nil
        end
      end

get_label_rect(tree_item_id) click to toggle source

Returns a Wx::Rect corresponding to the edges of an individual tree item’s text label. See above.

    # File wx/classes/treectrl.rb, line 36
      def get_label_rect(tree_item_id)
        rect = Wx::Rect.new
        if get_bounding_rect(tree_item_id, rect, true)
          return rect
        else
          nil
        end
      end

Disabled; run with $DEBUG to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.