' Qspintext component for Rapid-Q by Mesut Akcan ' ver : 1.00 ' 7 July 2000 ' http://kaynak.cjb.net ' http://makcan.virtualave.net ' makcan@softhome.net $apptype gui $typecheck on declare sub frm_click type Qspintext extends qpanel max as short min as short value as short ed as qedit sb as qscrollbar sub initial Qspintext.sb.max = Qspintext.min * -1 Qspintext.sb.min = Qspintext.max * -1 Qspintext.ed.text = str$(Qspintext.value) end sub constructor width = 50 height = 22 ed.parent = Qspintext sb.parent = Qspintext sb.kind = 1 sb.width = 18 sb.top = 2 ed.top = 3 ed.left= 2 ed.height = 16 sb.height = 18 'sb.max = Qspintext.min * -1 'sb.min = Qspintext.max * -1 sb.left= Qspintext.width - 20 ed.borderstyle = 0 ed.width = Qspintext.width - 22 bevelouter = 1 end constructor event sb.onchange dim p as short p = Qspintext.sb.position * -1 Qspintext.ed.text = str$(p) Qspintext.value = p end event event ed.onchange Qspintext.sb.position = val(Qspintext.ed.text) * -1 end event event ed.onkeydown (key as word, shift as integer) dim p as short p = Qspintext.sb.position if key = 38 then p-- ' up if key = 40 then p++ ' dw Qspintext.sb.position = p end event end type create form as qform create stx as Qspintext left = 10 top = 10 max = 125 min = - 10 value = - 3 end create onclick = frm_click end create stx.initial form.showmodal sub frm_click showmessage "Qspintext.value = " + str$(stx.value) end sub