$PBExportHeader$w_main.srw forward global type w_main from window end type type cb_gethistory from commandbutton within w_main end type type lb_history from listbox within w_main end type type sle_username from singlelineedit within w_main end type type st_1 from statictext within w_main end type type cb_get from commandbutton within w_main end type type cb_set from commandbutton within w_main end type type cb_cancel from commandbutton within w_main end type end forward global type w_main from window integer width = 1806 integer height = 1356 boolean titlebar = true string title = "Indirect Keyword Variable Demo" boolean controlmenu = true long backcolor = 67108864 string icon = "AppIcon!" boolean center = true cb_gethistory cb_gethistory lb_history lb_history sle_username sle_username st_1 st_1 cb_get cb_get cb_set cb_set cb_cancel cb_cancel end type global w_main w_main type variables n_indirect in_vars end variables on w_main.create this.cb_gethistory=create cb_gethistory this.lb_history=create lb_history this.sle_username=create sle_username this.st_1=create st_1 this.cb_get=create cb_get this.cb_set=create cb_set this.cb_cancel=create cb_cancel this.Control[]={this.cb_gethistory,& this.lb_history,& this.sle_username,& this.st_1,& this.cb_get,& this.cb_set,& this.cb_cancel} end on on w_main.destroy destroy(this.cb_gethistory) destroy(this.lb_history) destroy(this.sle_username) destroy(this.st_1) destroy(this.cb_get) destroy(this.cb_set) destroy(this.cb_cancel) end on type cb_gethistory from commandbutton within w_main integer x = 73 integer y = 672 integer width = 407 integer height = 132 integer taborder = 30 integer textsize = -8 integer weight = 400 fontcharset fontcharset = ansi! fontpitch fontpitch = variable! fontfamily fontfamily = swiss! string facename = "Tahoma" string text = "Get History" end type event clicked;in_vars.GetUsernameHistory(lb_history) end event type lb_history from listbox within w_main integer x = 549 integer y = 224 integer width = 1175 integer height = 836 integer taborder = 20 integer textsize = -8 integer weight = 400 fontcharset fontcharset = ansi! fontpitch fontpitch = variable! fontfamily fontfamily = swiss! string facename = "Tahoma" long textcolor = 33554432 boolean vscrollbar = true boolean sorted = false borderstyle borderstyle = stylelowered! end type type sle_username from singlelineedit within w_main integer x = 402 integer y = 64 integer width = 1321 integer height = 80 integer taborder = 10 integer textsize = -8 integer weight = 400 fontcharset fontcharset = ansi! fontpitch fontpitch = variable! fontfamily fontfamily = swiss! string facename = "Tahoma" long textcolor = 33554432 borderstyle borderstyle = stylelowered! end type type st_1 from statictext within w_main integer x = 73 integer y = 64 integer width = 329 integer height = 68 integer textsize = -10 integer weight = 400 fontcharset fontcharset = ansi! fontpitch fontpitch = variable! fontfamily fontfamily = swiss! string facename = "Tahoma" long textcolor = 33554432 long backcolor = 67108864 string text = "Username:" boolean focusrectangle = false end type type cb_get from commandbutton within w_main integer x = 73 integer y = 448 integer width = 407 integer height = 132 integer taborder = 20 integer textsize = -8 integer weight = 400 fontcharset fontcharset = ansi! fontpitch fontpitch = variable! fontfamily fontfamily = swiss! string facename = "Tahoma" string text = "Get Indirect" end type event clicked;String ls_Username // get the username ls_Username = in_vars.Username MessageBox("Username", ls_Username) end event type cb_set from commandbutton within w_main integer x = 73 integer y = 224 integer width = 407 integer height = 132 integer taborder = 10 integer textsize = -8 integer weight = 400 fontcharset fontcharset = ansi! fontpitch fontpitch = variable! fontfamily fontfamily = swiss! string facename = "Tahoma" string text = "Set Indirect" end type event clicked;// set the username String ls_Username ls_Username = sle_username.text If ls_Username = "" Then MessageBox("Edit Error", "Username is required!") sle_username.SetFocus() Else in_vars.Username = ls_Username End If end event type cb_cancel from commandbutton within w_main integer x = 1463 integer y = 1120 integer width = 261 integer height = 100 integer taborder = 10 integer textsize = -8 integer weight = 400 fontcharset fontcharset = ansi! fontpitch fontpitch = variable! fontfamily fontfamily = swiss! string facename = "Tahoma" string text = "Cancel" boolean cancel = true end type event clicked;Close(Parent) end event
File: w_main.srw
Size: 4810
Date: Mon, 31 Dec 2018 21:14:38 +0100
Size: 4810
Date: Mon, 31 Dec 2018 21:14:38 +0100
- window w_main(srw)
- commandbutton cb_gethistory
- listbox lb_history
- singlelineedit sle_username
- statictext st_1
- commandbutton cb_get
- commandbutton cb_set
- commandbutton cb_cancel