123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384 |
- $PBExportHeader$uo_aifmb_text.sru
- forward
- global type uo_aifmb_text from statictext
- end type
- end forward
- global type uo_aifmb_text 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_aifmb_text uo_aifmb_text
- 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
- THIS.Underline = TRUE
- ELSE
- ReleaseCapture()
- THIS.TextColor = colour_leave
- THIS.Underline = FALSE
- 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(55,155,255) //默认鼠标在的颜色
- colour_leave=RGB(0,0,0) //默认鼠标不在的颜色
- ifonraise=1 //默认鼠标在是突出
- end event
- event clicked;this.TextColor = colour_leave
- THIS.Underline = FALSE
- ib_mousein = NOT ib_mousein
- //this.Border=true
- //this.BorderStyle=Stylelowered!
- end event
- on uo_aifmb_text.create
- end on
- on uo_aifmb_text.destroy
- end on
|