VisualuRuby(tmp) Reference

VRRichedit

Coloring : swin class : vruby class

Class Hierarchy

Object
SWin::Window
VRWinComponent
VRControl
VRStdControl
VREdit
VRText
VRRichedit

Including Modules

none

Child classes or Classes/Modules including this

none

vr/vrrichedit.rb

VRRichedit

This class represents RichEdit Control. The parent class is VRText and this also has the same methods and event handlers.

Overwritten Methods

These methods are overwritten to support over64k texts.

getSel
setSel(st,en,noscroll=0)
char2line(ptr)

Methods

setTextFont(fontface,height=280,area=SCF_SELECTION)
Sets the text font. area parameter limits the changed area.
getTextFont(selarea=true)
Gets the text font and its size of the area. If selarea is true, the area is the selected area and the other case, it means the default font.
setTextColor(col,area=SCF_SELECTION)
Sets the color of the text in the area.
getTextColor(selarea=true)
Gets the text color in the area which is same as getTextFont.
setBold(flag=true,area=SCF_SELECTION)
Sets or resets the text style into BOLD. When flag is true, the text is set to bold style.
setItalic(flag=true,area=SCF_SELECTION)
Sets or resets the text style into ITALIC.
setUnderlined(flag=true,area=SCF_SELECTION)
Sets or resets the text style into UNDERLINED.
setStriked(flag=true,area=SCF_SELECTION)
Sets or resets the text style into STRIKE_OUT.
bold?(selarea=true)
Inspects whether the text style in the area is bold or not. If selarea is true, the area is selected area.
italic?(selarea=true)
Inspects whether the text style in the area is italic or not.
underlined?(selarea=true)
Inspects whether the text style in the area is underlined or not.
striked?(selarea=true)
Inspects whether the text style in the area is striked out or not.
setAlignment(align)
Sets text alignment of current paragraph. align can be PFA_LEFT, PFA_RIGHT or PFA_CENTER of VRRichedit constansts.
bkcolor=(color)
Sets the background color of the control.
selformat(area=SCF_SELECTION)
Gets the text format in area. The return value is an instance of FontStruct defined in rscutil.rb.
selformat=(format)
Set the text format in the selected area. format must be an instance of FontStruct.
charFromPos(x,y)
retrieves information about the character closest to a specified point in the client area. ((x)) is the horizontal coordinate. ((y)) is the vertical coordinate. the return value specifies character index by Fixnum.
charLineFromPos(x,y)
retrieves information about the character closest to a specified point in the client area. ((x)) is the horizontal coordinate. ((y)) is the vertical coordinate. the return value specifies character index and line index by Array. first item means character index. second item means line index.

VisualuRuby(tmp) Reference Index : Project HomePage(English) : Project HomePage(Japanese) : Sourceforge vruby page
Generated at Sun Feb 24 01:30:01 +0900 2008