Class: VRUpdown

Inherits:
VRNotifyControl show all
Defined in:
lib/vr/vrcomctl.rb,
lib/vr/compat/vrcomctl.rb

Constant Summary collapse

WINCLASSINFO =

VRUpdown

Updown control.

Methods

— setRange(minr,maxr)

Sets the range from ((|minr|)) to ((|maxr|)).

— getRange

Returns the range as an array [minr,maxr]

— position

Returns current position.

— position=

Sets current position.

— base

Radix.

— base=(b)

Sets the radix that is 10 or 16.

Event handlers

— ????_changed(pos)

Fired when the position is changing from ((|pos|)).
Note that ((|pos|)) is a previous value. To obtain the current value,
use buddy control which is a (edit) control made directry before 
the updown control(using VREdit#changed or its parent handler).
["msctls_updown32",0]

Instance Attribute Summary

Attributes inherited from VRNotifyControl

#_vr_notifyarg

Attributes inherited from VRControl

#handlers, #name, #parent

Attributes inherited from VRWinComponent

#parent, #screen

Instance Method Summary collapse

Methods inherited from VRNotifyControl

#_vr_ntfyhandlers, #addFilterArg, #addNotifyHandler, #deleteFilterArg, #deleteNotifyHandler, #notifycontrolinit

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=, #winstyle

Instance Method Details

#baseObject



1263
1264
1265
# File 'lib/vr/vrcomctl.rb', line 1263

def base
  sendMessage WMsg::UDM_GETBASE,0,0
end

#base=(b) ⇒ Object



1260
1261
1262
# File 'lib/vr/vrcomctl.rb', line 1260

def base=(b)
  sendMessage WMsg::UDM_SETBASE,b.to_i,0
end

#getRangeObject



1248
1249
1250
1251
# File 'lib/vr/vrcomctl.rb', line 1248

def getRange
  r=sendMessage WMsg::UDM_GETRANGE,0,0
  return HIWORD(r),LOWORD(r)
end

#positionObject



1256
1257
1258
# File 'lib/vr/vrcomctl.rb', line 1256

def position
  sendMessage WMsg::UDM_GETPOS,0,0
end

#position=(p) ⇒ Object



1253
1254
1255
# File 'lib/vr/vrcomctl.rb', line 1253

def position=(p)
  sendMessage WMsg::UDM_SETPOS,0,MAKELPARAM(p.to_i,0)
end

#setRange(minr, maxr) ⇒ Object



1245
1246
1247
# File 'lib/vr/vrcomctl.rb', line 1245

def setRange(minr,maxr)
  sendMessage WMsg::UDM_SETRANGE,0,MAKELPARAM(maxr,minr)
end

#updowninitObject



1235
1236
1237
1238
1239
# File 'lib/vr/vrcomctl.rb', line 1235

def updowninit
  addNotifyHandler(WMsg::UDN_DELTAPOS,"deltapos",
                  MSGTYPE::ARGSTRUCT,WStruct::NM_UPDOWN)
  addFilterArg WMsg::UDN_DELTAPOS,"TF"
end

#vrinitObject



1240
1241
1242
1243
# File 'lib/vr/vrcomctl.rb', line 1240

def vrinit
  super
  updowninit
end

#vrinitnewObject



2
3
4
5
# File 'lib/vr/compat/vrcomctl.rb', line 2

def vrinit
  super
  updowninit
end