Class: VRRebar
Constant Summary
collapse
- WINCLASSINFO =
VRRebar
Rebar control.
If comctl32.dll on your system is too old, this is not available.
Methods
— insertband(cntl,txt,minx=30,miny=cnt.h+2,band=-1)
Creates a new band and set the control on it.
((|txt|)) is the caption of the band and minx/miny is the minimum size of
the band.
The control is created by rebar's addControl() but its event handling is on
the parent window.
— bkColor=© — bkColor
Sets/Gets background color of rebar.
— textColor=© — textColor
Sets/Gets band caption color.
— relayout(x=self.x, y=self.y, w=self.w, h=self.h)
rearranges rebar's bands in the specified rectangle.
["ReBarWindow32",0]
Constants included
from VRParent
VRParent::DEFAULT_FONT, VRParent::VR_ADDCONTROL_FEWARGS
Instance Attribute Summary
Attributes included from VRParent
#screen
#_vr_notifyarg
Attributes inherited from VRControl
#handlers, #name, #parent
#parent, #screen
Instance Method Summary
collapse
Methods included from VRParent
#addArrayedControl, #addControl, #clearControls, #construct, #countControls, #create, #createControl, #deleteControl, #parentinit, #registerControlAsArrayed, #self_created, #send_parent
#_vr_ntfyhandlers, #addFilterArg, #addNotifyHandler, #deleteFilterArg, #deleteNotifyHandler, #notifycontrolinit
Methods inherited from VRControl
Controltype, #add_parentcall, #call_parenthandler, #create, #setFont
#_init, #create, #exwinstyle, #hide, #maximizebox, #maximizebox=, #minimizebox, #minimizebox=, #setscreen, #sizebox, #sizebox=, #tabstop, #tabstop=, #winstyle
Instance Method Details
1743
1744
1745
|
# File 'lib/vr/vrcomctl.rb', line 1743
def bkColor
sendMessage WMsg::RB_GETBKCOLOR,0,0
end
|
#bkColor=(c) ⇒ Object
1746
1747
1748
|
# File 'lib/vr/vrcomctl.rb', line 1746
def bkColor=(c)
sendMessage WMsg::RB_SETBKCOLOR,0,c
end
|
1739
1740
1741
|
# File 'lib/vr/vrcomctl.rb', line 1739
def h
sendMessage WMsg::RB_GETBARHEIGHT,0,0
end
|
#insertband(cnt, txt, minx = 30, miny = cnt.h+2, band = -1)) ⇒ Object
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
|
# File 'lib/vr/vrcomctl.rb', line 1720
def insertband(cnt,txt,minx=30,miny=cnt.h+2,band=-1)
size = 4*14
mask= WConst::RBBIM_TEXT | WConst::RBBIM_STYLE | WConst::RBBIM_CHILD | WConst::RBBIM_CHILDSIZE | WConst::RBBIM_SIZE
style= 4 frcolor= 0
bkcolor= 0
text= txt
cch= 0
image= 0
hwndChild= cnt.hWnd
cxmin= minx
cymin= miny
cx= 100
bkBmp= 0
wid= 0
tis = [size,mask,style,frcolor,bkcolor,text,cch,image,hwndChild,cxmin,cymin,cx,bkBmp,wid].pack("LLLLLP#{text.length}LLLLLLLL")
sendMessage WMsg::RB_INSERTBAND,band,tis
end
|
#newControlID ⇒ Object
1762
1763
1764
|
# File 'lib/vr/vrcomctl.rb', line 1762
def newControlID
@parent.newControlID
end
|
#registerControl(*arg) ⇒ Object
1765
1766
1767
|
# File 'lib/vr/vrcomctl.rb', line 1765
def registerControl(*arg)
@parent.registerControl(*arg)
end
|
#relayout(x = self.x, y = self.y, w = self.w, h = self.h) ⇒ Object
1757
1758
1759
|
# File 'lib/vr/vrcomctl.rb', line 1757
def relayout(x=self.x,y=self.y,w=self.w,h=self.h)
sendMessage WMsg::RB_SIZETORECT,0,[x,y,w,h].pack("LLLL")
end
|
#textColor ⇒ Object
1750
1751
1752
|
# File 'lib/vr/vrcomctl.rb', line 1750
def textColor
sendMessage WMsg::RB_GETTEXTCOLOR,0,0
end
|
#textColor=(c) ⇒ Object
1753
1754
1755
|
# File 'lib/vr/vrcomctl.rb', line 1753
def textColor=(c)
sendMessage WMsg::RB_SETTEXTCOLOR,0,c
end
|
1715
1716
1717
1718
|
# File 'lib/vr/vrcomctl.rb', line 1715
def vrinit
super
rebarinit
end
|