- Ruby Basics
- Ruby - Home
- Ruby - Overview
- Ruby - Environment Setup
- Ruby - Syntax
- Ruby - Classes and Objects
- Ruby - Variables
- Ruby - Operators
- Ruby - Comments
- Ruby - IF...ELSE
- Ruby - Loops
- Ruby - Methods
- Ruby - Blocks
- Ruby - Modules
- Ruby - Strings
- Ruby - Arrays
- Ruby - Hashes
- Ruby - Date & Time
- Ruby - Ranges
- Ruby - Iterators
- Ruby - File I/O
- Ruby - Exceptions
- Ruby Advanced
- Ruby - Object Oriented
- Ruby - Regular Expressions
- Ruby - Database Access
- Ruby - Web Applications
- Ruby - Sending Email
- Ruby - Socket Programming
- Ruby - Ruby/XML, XSLT
- Ruby - Web Services
- Ruby - Tk Guide
- Ruby - Ruby/LDAP Tutorial
- Ruby - Multithreading
- Ruby - Built-in Functions
- Ruby - Predefined Variables
- Ruby - Predefined Constants
- Ruby - Associated Tools
- Ruby Useful Resources
- Ruby - Quick Guide
- Ruby - Useful Resources
- Ruby - Discussion
- Ruby - Ruby on Rails Tutorial
Ruby/TK - Separator Widget
The Separator widget provides a convenient way of dividing a window into logical parts. You can group widgets in one display using a thin horizontal or vertical rule between groups of widgets.
Syntax
Here is a simple syntax to create this widget −
Tk::Tile::Separator.new(root) { .....Standard Options.... .....Widget Specific Options.... }
Standard Options
- class
- cursor
- state
- style
- takefocus
Widget Specific Options
Sr.No. | Options & Description |
---|---|
1 | orient => String One of horizontal or vertical. Specifies the orientation of the separator. |
Examples
require 'tk' require 'tkextlib/tile' $resultsVar = TkVariable.new root = TkRoot.new root.title = "Window" n = Tk::Tile::Notebook.new(root)do height 110 place('height' => 100, 'width' => 200, 'x' => 10, 'y' => 10) end f1 = TkFrame.new(n) f2 = TkFrame.new(n) f3 = TkFrame.new(n) n.add f1, :text => 'One' n.add f2, :text => 'Two' n.add f3, :text => 'Three' s1 = Tk::Tile::Separator.new(f1) do orient 'vertical' place('height' => 200, 'x' => 40, 'y' => 10) end s2 = Tk::Tile::Separator.new(f1) do orient 'vertical' place('height' => 200, 'x' => 80, 'y' => 10) end Tk.mainloop
This will produce the following result −
ruby_tk_guide.htm
Advertisements