$PBExportHeader$w_genapp_toolbars.srw $PBExportComments$Generated toolbar configuration window forward global type w_genapp_toolbars from window end type type rb_floating from radiobutton within w_genapp_toolbars end type type rb_bottom from radiobutton within w_genapp_toolbars end type type rb_right from radiobutton within w_genapp_toolbars end type type rb_top from radiobutton within w_genapp_toolbars end type type rb_left from radiobutton within w_genapp_toolbars end type type cb_done from commandbutton within w_genapp_toolbars end type type cb_visible from commandbutton within w_genapp_toolbars end type type cbx_showtips from checkbox within w_genapp_toolbars end type type cbx_showtext from checkbox within w_genapp_toolbars end type type gb_1 from groupbox within w_genapp_toolbars end type end forward global type w_genapp_toolbars from window integer x = 850 integer y = 468 integer width = 1157 integer height = 856 boolean titlebar = true string title = "工具栏设置" boolean controlmenu = true windowtype windowtype = response! long backcolor = 134217739 rb_floating rb_floating rb_bottom rb_bottom rb_right rb_right rb_top rb_top rb_left rb_left cb_done cb_done cb_visible cb_visible cbx_showtips cbx_showtips cbx_showtext cbx_showtext gb_1 gb_1 end type global w_genapp_toolbars w_genapp_toolbars type variables /* Current application */ Application iapp_application /* Owning toolbar window */ Window iw_window end variables event open;// MOVE TO CENTER environment exerun_env GetEnvironment(exerun_env ) this.Move ( (exerun_env.screenwidth*4.62 - this.Width)/2, (exerun_env.screenheight*3.87 - this.Height)/2) // Owning toolbar window is passed as reference iw_window = message.powerobjectparm // Note the current application iapp_application = GetApplication () // Set toolbar alignment status choose case iw_window.toolbaralignment case alignatbottom! rb_bottom.Checked = TRUE case alignatleft! rb_left.Checked = TRUE case alignatright! rb_right.Checked = TRUE case alignattop! rb_top.Checked = TRUE case floating! rb_floating.Checked = TRUE end choose // Set toolbar visible status if iw_window.toolbarvisible then cb_visible.text = "[&H]隐藏" else cb_visible.text = "[&S]显示" end if // Set toolbar text mode status cbx_showtext.checked = iapp_application.toolbartext // Set toolbar tips mode status cbx_showtips.checked = iapp_application.toolbartips end event on w_genapp_toolbars.create this.rb_floating=create rb_floating this.rb_bottom=create rb_bottom this.rb_right=create rb_right this.rb_top=create rb_top this.rb_left=create rb_left this.cb_done=create cb_done this.cb_visible=create cb_visible this.cbx_showtips=create cbx_showtips this.cbx_showtext=create cbx_showtext this.gb_1=create gb_1 this.Control[]={this.rb_floating,& this.rb_bottom,& this.rb_right,& this.rb_top,& this.rb_left,& this.cb_done,& this.cb_visible,& this.cbx_showtips,& this.cbx_showtext,& this.gb_1} end on on w_genapp_toolbars.destroy destroy(this.rb_floating) destroy(this.rb_bottom) destroy(this.rb_right) destroy(this.rb_top) destroy(this.rb_left) destroy(this.cb_done) destroy(this.cb_visible) destroy(this.cbx_showtips) destroy(this.cbx_showtext) destroy(this.gb_1) end on type rb_floating from radiobutton within w_genapp_toolbars integer x = 155 integer y = 484 integer width = 334 integer height = 72 integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 long backcolor = 134217739 string text = "[&F]浮动" end type event clicked;// Make toolbar float iw_window.toolbaralignment = floating! end event type rb_bottom from radiobutton within w_genapp_toolbars integer x = 155 integer y = 396 integer width = 315 integer height = 72 integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 long backcolor = 134217739 string text = "[&B]底" end type event clicked;// Align toolbar at bottom iw_window.toolbaralignment = alignatbottom! end event type rb_right from radiobutton within w_genapp_toolbars integer x = 155 integer y = 308 integer width = 279 integer height = 72 integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 long backcolor = 134217739 string text = "[&R]右" end type event clicked;// Align toolbar at right iw_window.toolbaralignment = alignatright! end event type rb_top from radiobutton within w_genapp_toolbars integer x = 155 integer y = 220 integer width = 274 integer height = 72 integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 long backcolor = 134217739 string text = "[&T]顶" end type event clicked;// Align toolbar at top iw_window.toolbaralignment = alignattop! end event type rb_left from radiobutton within w_genapp_toolbars integer x = 155 integer y = 124 integer width = 247 integer height = 72 integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 long backcolor = 134217739 string text = "[&L]左" end type event clicked;// Align toolbar at left iw_window.toolbaralignment = alignatleft! end event type cb_done from commandbutton within w_genapp_toolbars integer x = 690 integer y = 232 integer width = 334 integer height = 96 integer taborder = 30 integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" string text = "[&D]确定" end type event clicked;// Close toolbar configuration window Close (parent) end event type cb_visible from commandbutton within w_genapp_toolbars integer x = 690 integer y = 84 integer width = 334 integer height = 96 integer taborder = 20 integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" string text = "[&H]隐藏" boolean default = true end type event clicked;// Indicate opposite toolbar visible status if this.text = "[&H]隐藏" then iw_window.toolbarvisible = FALSE this.text = "[&S]显示" else iw_window.toolbarvisible = TRUE this.text = "[&H]隐藏" end if end event type cbx_showtips from checkbox within w_genapp_toolbars integer x = 635 integer y = 624 integer width = 439 integer height = 72 integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 long backcolor = 134217739 string text = "[&p]显示提示" end type event clicked;// Set toolbar tips mode iapp_application.toolbartips = this.checked end event type cbx_showtext from checkbox within w_genapp_toolbars integer x = 101 integer y = 624 integer width = 457 integer height = 72 integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 long backcolor = 134217739 string text = "[&x]显示文字" end type event clicked;// Set toolbar text mode iapp_application.toolbartext = this.checked end event type gb_1 from groupbox within w_genapp_toolbars integer x = 91 integer y = 52 integer width = 457 integer height = 544 integer taborder = 10 integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 long backcolor = 134217739 string text = "移动" end type