Groups > dBase > dBase shared code > SpinText




SpinText

SpinText
Wed, 04 Oct 2006 03:04:13 -040
*
* Tom Stancel 10/04/2006
*
** END HEADER -- do not remove this line
//
// Generated on 10/04/2006
//
parameter bModal
local f
f = new SpinTextForm()
if (bModal)
   f.mdi = false // ensure not MDI
   f.readModal()
else
   f.open()
endif

class SpinTextForm of FORM
   with (this)
      metric = 6	// Pixels
      height = 120
      left = 259
      top = 0
      width = 280
      text = "SpinText"
      icon = "resource #8230"
   endwith

   this.SPINTEXT1 = new CONTAINER(this)
   with (this.SPINTEXT1)
      onOpen = class::SPINTEXT1_ONOPEN
      left = 94
      top = 50
      width = 91
      height = 26
   endwith

   this.SPINTEXT1.SPINBOX1 = new SPINBOX(this.SPINTEXT1)
   with (this.SPINTEXT1.SPINBOX1)
      onChange = {; this.parent.TEXTLABEL1.text =
this.parent.aText[this.value]}
      height = 20
      left = 0
      top = 0
      width = 85
      colorNormal = "WindowText/magenta"
      rangeMax = 10
      rangeMin = 1
      border = false
      value = 1
      spinOnly = true
      rangeRequired = true
      pageno = 0
      borderStyle = 3	// None
   endwith

   this.SPINTEXT1.TEXTLABEL1 = new TEXTLABEL(this.SPINTEXT1)
   with (this.SPINTEXT1.TEXTLABEL1)
      height = 20
      left = 0
      top = 0
      width = 65
      text = " One"
      colorNormal = "BtnText/white"
      borderStyle = 3	// None
      pageno = 0
      alignVertical = 1	// Middle
   endwith


   Function SPINTEXT1_ONOPEN
   ***********************************
      this.aText = new array(this.SPINBOX1.rangeMax)
      // the extra space is to move the text in from the left edge (or use Text
object) ...
      this.aText[1] = " One"
      this.aText[2] = " Two"
      this.aText[3] = " Three"
      this.aText[4] = " Four"
      this.aText[5] = " Five"
      this.aText[6] = " Six"
      this.aText[7] = " Seven"
      this.aText[8] = " Eight"
      this.aText[9] = " Nine"
      this.aText[10] = " Ten"
   return

*
endclass
Post Reply
about | contact