Class: VRCheckbox

Inherits:
VRButton show all
Defined in:
lib/vr/vrcontrol.rb

Direct Known Subclasses

VRRadiobutton

Constant Summary collapse

WINCLASSINFO =

VRCheckbox

Check box. Parent class is ((<VRButton>))

Methods

Checkbox has the following methods. — checked?

Return boolean value whether checkbox is checked or not.

— check(v)

Check checkbox as v(=true/false).
["BUTTON",WStyle::BS_AUTOCHECKBOX]

Instance Attribute Summary

Attributes inherited from VRControl

#handlers, #name, #parent

Attributes inherited from VRWinComponent

#parent, #screen

Instance Method Summary collapse

Methods inherited from VRButton

#vrinit

Methods inherited from VRStdControl

#_vr_cmdhandlers, #addCommandHandler, #deleteCommandHandler

Methods inherited from VRControl

Controltype, #add_parentcall, #call_parenthandler, #create, #setFont

Methods inherited from VRWinComponent

#_init, #create, #exwinstyle, #hide, #maximizebox, #maximizebox=, #minimizebox, #minimizebox=, #setscreen, #sizebox, #sizebox=, #tabstop, #tabstop=, #vrinit, #winstyle

Instance Method Details

#check(v) ⇒ Object



278
279
280
# File 'lib/vr/vrcontrol.rb', line 278

def check(v)
  sendMessage WMsg::BM_SETCHECK, ( (v)? 1 : 0 ),0
end

#checked?Boolean

Returns:

  • (Boolean)


274
275
276
277
# File 'lib/vr/vrcontrol.rb', line 274

def checked?
  c=sendMessage(WMsg::BM_GETCHECK,0,0)               #getcheck
  return c!=0
end