12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 |
- $PBExportHeader$uo_aifmb_tab.sru
- forward
- global type uo_aifmb_tab from tab
- end type
- end forward
- global type uo_aifmb_tab from tab
- integer width = 1490
- integer height = 980
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long backcolor = 67108864
- boolean raggedright = true
- boolean focusonbuttondown = true
- integer selectedtab = 1
- end type
- global uo_aifmb_tab uo_aifmb_tab
- type prototypes
- Function Long SetParent(Long hWndChild,Long hWndNewParent) Library "User32.dll"
- end prototypes
- forward prototypes
- public subroutine wf_setdatasource (datastore arg_ds)
- public subroutine wf_opentab (string chname, string winname)
- public subroutine wf_reset ()
- end prototypes
- public subroutine wf_setdatasource (datastore arg_ds);Long i
- String ls_chname, ls_winname
- uo_aifmb_tabpage tabpage
- wf_reset()
- FOR i = 1 To arg_ds.RowCount()
- IF arg_ds.Object.ifshow[i] <> 1 THEN CONTINUE
- ls_chname = arg_ds.Object.chname[i]
- ls_winname = arg_ds.Object.winname[i]
- OpenTab(tabpage, 0)
- tabpage.Text = ls_chname
- tabpage.winname = ls_winname
- NEXT
- end subroutine
- public subroutine wf_opentab (string chname, string winname);Long i
- uo_aifmb_tabpage tabpage
- FOR i = 1 To UpperBound(Control)
- IF Lower(ClassName(Control[i])) = 'uo_aifmb_tabpage' THEN
- tabpage = Control[i]
- IF Lower(tabpage.winname) = Lower(winname) THEN
- EXIT
- END IF
- END IF
- NEXT
- IF i >= 1 And i <= UpperBound(Control) THEN
- SelectTab(tabpage)
- ELSE
- OpenTab(tabpage, 0)
- tabpage.Text = chname
- tabpage.winname = winname
- SelectTab(tabpage)
- END IF
- end subroutine
- public subroutine wf_reset ();Long i
- userobject ctrls[]
- ctrls = Control
- FOR i = 1 To UpperBound(ctrls)
- CloseTab(ctrls[i])
- NEXT
- end subroutine
- event selectionchanged;uo_aifmb_tabpage tabpage
- tabpage = Control[newindex]
- IF Not IsValid(tabpage.win) THEN
- Open(tabpage.win, tabpage.winname)
- setparent(Handle(tabpage.win), Handle(tabpage))
- END IF
- tabpage.triggerevent('resize')
- end event
|