12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 |
- $PBExportHeader$uo_text_m.sru
- forward
- global type uo_text_m from statictext
- end type
- end forward
- global type uo_text_m from statictext
- integer width = 261
- integer height = 72
- integer textsize = -11
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- string pointer = "HAND.CUR"
- long textcolor = 33554432
- long backcolor = 16777215
- string text = "none"
- boolean focusrectangle = false
- event mousemove pbm_mousemove
- event key pbm_keydown
- end type
- global uo_text_m uo_text_m
- type variables
- long colour_on=0 ,colour_leave=0
- int ifonraise=0
- Boolean ib_mousein
- end variables
- event mousemove;IF ib_mousein <> (xpos > 0 AND ypos > 0 AND xpos < Width AND ypos < Height) THEN RETURN
- //if this.TextColor <> colour_on then
- // this.TextColor = colour_on
- // if ifonraise=1 then
- // this.Border=true
- // this.BorderStyle=StyleRaised!
- // end if
- //else
- // this.TextColor = colour_leave
- // this.Border=false
- //end if
- //
- IF ib_mousein THEN
- SetCapture(Handle(THIS))
- this.TextColor = colour_on
- ELSE
- ReleaseCapture()
- this.TextColor = colour_leave
- END IF
- ib_mousein = NOT ib_mousein
- end event
- event key;If key = KeyEnter! Then //
- this.triggerevent(clicked!)
- End If
- end event
- event constructor;colour_on=RGB(0,0,255) //默认鼠标在的颜色
- colour_leave=RGB(0,0,0) //默认鼠标不在的颜色
- ifonraise=1 //默认鼠标在是突出
- end event
- event clicked;this.TextColor = colour_on
- //this.Border=true
- //this.BorderStyle=Stylelowered!
- end event
- on uo_text_m.create
- end on
- on uo_text_m.destroy
- end on
|