Class
Lcheckbox
Home
In: locana/l_checkbox.rb
Parent: Lobject

This is a checkbox allowing you to check/uncheck the value. Based on the Lobject class. Supports the following attributes:

Methods

box_border, box_bwidth, box_color, box_pos, box_pos=, checkbox_spacing, checkbox_width, on_click, on_key_release, on_mouse_lup, paint_check, paint_checkbox, paint_normal, pixel_height, pixel_width, text=, valid_attribute?,
Public Instance methods
valid_attribute?(attribute, lvalue=nil) src

Supports the :box_pos attribute.

box_border() src

Returns the border used for the box that contains the check. This can return any supported border. Returns :sunken.

box_bwidth() src

Returns the width of the border used for the box that contains the check. Returns border width of the box_border.

box_color() src

Returns the color of the box (border) that contains the check. Returns fg() to match the foreground color of the text.

box_pos() src

Returns the position of the box that contains the check. Supported values are :left or :right.

box_pos=(new_value) src

Sets the position of the box that contains the check.

paint_normal() src

Paints background color, the text, the checkbox border by calling paint_checkbox , and the check mark by calling paint_check.

paint_checkbox() src

Paints the checkbox as a border. Called by paint_normal. This calls paint_check() to paint the check in the checkbox.

paint_check(left, top, right, bottom) src

Paints the check in the checkbox when :value = true.

on_click(levent=nil, &block) src

This is triggered by the :on_key_release of the space bar or the :on_mouse_lup event and triggers the on_change event. This paints or removes the check (‘X’) depending on the new state of the checkbox.

on_key_release(levent=nil, &block) src

Pressing the spacebar triggers the :on_click event.

on_mouse_lup(levent=nil, &block) src

Triggers the :on_click event.

checkbox_spacing() src

Returns the distance between the text and the checkbox. The default is 4.

checkbox_width() src

The width of the checkbox. By default this returns the same as the height which is the height of the text in the text box.

pixel_width() src

Returns the pixel width of the text in the object plus the checkbox_width plus the checkbox_spacing. This should take into consideration the font, size, and style of the object and its parents. This is used to calculate width of the object when needed.

pixel_height() src

Returns the pixel height of the text in the object. This should take into consideration the font, size, and style of the object and its parents. This is used to calculate height of the object when needed.

text=(new_value) src

Converts ’&’ (except ’& ’) to an accelerator.


Seva Software


Thank you for taking the time to visit this web page. I trust you found the information contained in this page useful.
Please email any questions, concerns, or issues with this web site to webmaster@sevasoftware.com.
Please remember Seva Software when your company would benefit from an experienced database architect and software engineer.

http://www.arunadb.org http://www.locana.org http://www.ruby-lang.org http://www.coolwell.org http://www.sevasoftware.com